Modifying an existing Table

 
Adding a field to your table:
Suppose you have an existing table (directory) that has Lname, Fname, Phone, Box_no and ID_num as its fields. You would like to add another field to hold a persons Major (CS, MATH, etc.); you could use the alter table command as follows:

mysql> Alter table directory
mysql> add major varch(10);

This will add the field and populat it with NULL's to show no data is yet entered.

Drop a field from your table:
Suppose you have, once again, changed your mind and wish to drop the field (major); you could use the alter table command as follows:

mysql> Alter table directory
mysql> drop field major;

The remove the field major with all the data (none in this case) being destroyed. The alter table command can be used to alter other feature of your table, see the complete documentation for mysql http://www.mysql.com/ for details.