Skip to main contentSkip to solution

Which of the following command is used to add/remove a column or to modify its datatype inside a table?

Solution

✅ Correct Option: 3

ALTER TABLE changes the structure of an existing table. It can add a column (ADD), remove a column (DROP COLUMN), or change a column's datatype (MODIFY or ALTER COLUMN, depending on the DBMS).


Drop: removes a whole table or database object. It is used inside ALTER only as DROP COLUMN, so on its own it cannot add a column or modify a datatype.

Update: changes the data (values) in existing rows, not the table structure.

Set: not a standalone command here. It only assigns values inside an UPDATE statement.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question