Skip to main contentSkip to solution

Which of the following is the correct statement to add new column in existing table?

Solution

✅ Correct Option: 1

The SQL command to change the structure of an existing table is ALTER TABLE, and the ADD clause inside it adds a new column. The syntax is ALTER TABLE tablename ADD column_name DATATYPE;\texttt{ALTER TABLE tablename ADD column\_name DATATYPE;}


Option 2: MODIFY changes the datatype or size of a column that already exists. It does not add a new one.

Options 3 and 4: UPDATE is a DML command that changes the data (values) in existing rows. It cannot change the table structure, and "UPDATE TABLE" is not valid SQL at all.

ALTER changes the structure (DDL), while UPDATE changes the data (DML).

Keyboard Shortcuts

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