You can use the ALTER TABLE command to change part of a table definition. You can ADD, MODIFY, or DROP a column on a live table, although, of course, you should take care to ensure that doing so will not cause errors in an application or query that relies on the existing table structure.
To add a new column, use the ADD keyword followed by a column definition. For example, the following statement adds a new column named fax to the customer_contacts table, which has a maximum length of 12 characters:
mysql> ALTER TABLE customer_contacts -> ADD fax VARCHAR(12); Query OK, 11 rows affected (0.00 sec) Records: 11 Duplicates: 0 Warnings: 0
To modify an existing column, use the MODIFY keyword followed by the existing column name, a ...