An ALTER TABLE statement (alter_table_statement)changes the properties of a base table.
<alter_table_statement> ::=
ALTER TABLE <table_name> <add_definition>
| ALTER TABLE <table_name> <alter_definition>
| ALTER TABLE <table_name> <column_change_definition>
| ALTER TABLE <table_name> <drop_definition>
| ALTER TABLE <table_name> <modify_definition>
| ALTER TABLE <table_name> <referential_constraint_definition>
| ALTER TABLE <table_name> <sample_definition>
If the name of the schema is not specified in the table name, the current schema is assumed implicitly. The table name must be the name of an existing base table. The table must not be a temporary base table. The current user must have the ALTER privilege for the specified table.
ADD Definition |
Defines additional table properties |
ALTER Definition |
Changes CONSTRAINT or key definitions |
COLUMN Change Definition |
Changes column properties |
DROP Definition |
Deletes table properties |
MODIFY Definition |
Changes data types and column attributes |
Referential CONSTRAINT Definition |
Defines a new referential constraint |
SAMPLE Definition |
Defines the number of rows that the database system is to take into account when it determines table statistics. |