The basic syntax of an ALTER TABLE command to change the DATA TYPE of a column in a table is as follows.ĪLTER TABLE table_name MODIFY COLUMN column_name datatype The basic syntax of an ALTER TABLE command to DROP COLUMN in an existing table is as follows.ĪLTER TABLE table_name DROP COLUMN column_name The basic syntax of an ALTER TABLE command to add a New Column in an existing table is as follows.ĪLTER TABLE table_name ADD column_name datatype You should also use the ALTER TABLE command to add and drop various constraints on an existing table. The SQL ALTER TABLE command is used to add, delete or modify columns in an existing table.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |