Action | Syntax |
Add a column | ALTER TABLE table ADD COLUMN field type [(size)] [NOT NULL] [CONSTRAINT constraint] |
Delete a column | ALTER TABLE table DROP COLUMN field |
Add a table constraint | ALTER TABLE ADD CONSTRAINT constraint |
Remove a constraint | ALTER TABLE DROP CONSTRAINT constraint |
The parts of the above statements have the following meanings:
Part | Meaning |
table | The name of the table to be altered. |
field | The name of tbe field to be added or removed from the table |
type | The data type of the field |
size | The field size in characters |
constraint | The constraint to be imposed or removed, expressed as a CONSTRAINT clause. |