SQL ALTER TABLE statement

The ALTER TABLE statement is used to update database table definitions. For example, to add a column in a table, use the following command:

ALTER TABLE table_name ADD column_name datatype;

To delete a column in table, use the following syntax:

ALTER TABLE table_name DROP COLUMN column_name;

To change the data type of a column in a database table, use the following syntax:

ALTER TABLE table_name MODIFY COLUMN column_name datatype;

Geek University 2022