Adding a new column to a table
ALTER TABLE helps you add a column with specified data type to an existing table.
ALTER TABLE customer ADD COLUMN address TEXT;
Let’s break down our statement:
ALTER TABLEis followed by the table name.
ADD COLUMNlets you add a column. It is followed by the name of the column
- After writing the name of the column, we have to specify it’s type. In our example, the data type of our new column “address” is