How to add a column in a database table?

When a table is already created in your database and suddenly you wanted to add additional columns into it, the question is how are you going to do it. Well, the answer to that is to use the ADD COLUMN command.

ADD COLUMN is used to add a column to your existing table.


ALTER TABLE table_name ADD COLUMN new_column_name datatype(Number of Characters);

Supposed you have a table in your  SALES database named Products and currently the table has three(3) columns

and you wanted to add another column to it, say Prod_code is to be included in the list. By following the syntax given above, we can now have this output.