Multiple choice technology mainframe

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 columns name

  4. Change the length of VARCHAR column

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The ALTER TABLE statement can add columns, drop constraints, and modify VARCHAR column lengths, but cannot rename a column directly. Column renaming typically requires a database-specific approach or dropping and recreating the column with the new name.

AI explanation

Changing a column's name is correct — standard ALTER TABLE clauses (ADD COLUMN, DROP CONSTRAINT/CHECK, MODIFY column length/type) let you add columns, remove constraints, and resize a VARCHAR, but simply renaming an existing column isn't part of the basic ALTER TABLE ADD/MODIFY/DROP vocabulary in many SQL dialects — it typically requires a distinct, separately-specified clause (e.g., RENAME COLUMN) or isn't supported at all without dropping and recreating the column, which is why it's singled out as something ALTER TABLE can't do in the classic sense being tested here.