This section describes how to change the structure of a table using the ALTER TABLE statement.
The following command adds a column to the skill table to allow space for an optional description of the skill:
ALTER TABLE skill ADD skill_description CHAR( 254 )
The following statement changes the name of the skill_type column to classification:
ALTER TABLE skill RENAME skill_type TO classification
The following statement deletes the classification column.
ALTER TABLE skill DELETE classification
The following statement changes the name of the entire table:
ALTER TABLE skill RENAME qualification
These examples show how to change the structure of the database. The ALTER TABLE statement can change many characteristics of a table—foreign keys can be added or deleted, and so on. However, you cannot use MODIFY to change table or column constraints. Instead, you must DELETE the old constraint and ADD the new one. In all these cases, once you make the change, stored procedures, views, and any other item referring to this column will no longer work.