Which of the following can NOT be done using the ALTER TABLE statement?

  1. Add a new column

  2. Drop a check constraint

  3. Change a column's name

  4. Change the length of a VARCHAR column


Correct Option: C

AI Explanation

To answer this question, you need to understand the capabilities of the ALTER TABLE statement in SQL. Let's go through each option to understand why it is correct or incorrect:

Option A) Add a new column - This option is correct because the ALTER TABLE statement can be used to add a new column to an existing table.

Option B) Drop a check constraint - This option is correct because the ALTER TABLE statement can be used to drop or remove a check constraint from a table.

Option C) Change a column's name - This option is incorrect because the ALTER TABLE statement can be used to change a column's name in SQL. Therefore, it can be done using the ALTER TABLE statement.

Option D) Change the length of a VARCHAR column - This option is correct because the ALTER TABLE statement can be used to modify the length of a VARCHAR column in SQL.

The correct answer is C. Changing a column's name can be done using the ALTER TABLE statement.

Find more quizzes: