Alter table command is used to modify existing column or add new column to an existing table.
There are 2 keywords used
ADD and MODIFY.
We can alter the table in two ways.
- We can add a new column to the existing table using the following
syntax,
ALTER TABLE
<tablename>ADD(<cloumnname><type><constraint>);
- We can also change or modify the existing column in terms of type or size using the following
syntax,
ALTER
TABLE<tablename>MODIFY<column><newtype>);