Changes an existing table definition. You can:
o Add columns
o Add constraints to tables or columns
o Modify columns
o Modify character sets
o Modify data types
o Delete columns
o Delete constraints
The ALTER TABLE statement can also add or delete table-specific
constraints. You can display the names for all constraints
currently associated with a table by using the SHOW TABLE
statement. Any number of constraints can be deleted and
declared at both the table and column levels. See also the ALTER
CONSTRAINT statement and the DROP CONSTRAINT. statement.
When you execute this statement, SQL modifies the named column
definitions in the table. All of the columns that you do not
mention remain unchanged. SQL defines new versions of columns
before defining constraints. Then, SQL defines and evaluates
constraints before storing them. Therefore, if columns and
constraints are defined in the same table definition, constraints
always apply to the latest version of a column.
When you change a table definition, other users see the revised
definition only when they connect to the database after you
commit the changes.
Additional Information:
explode
extract