ALTER TABLE Statement If supported, permit concurrent reads but block writes. Writes are blocked even if concurrent writes are supported by the storage engine for the given  ALGORITHM  clause (if any) and  ALTER TABLE  operation. If concurrent reads are not supported, an error occurs. Enforce exclusive access. This is done even if concurrent reads/writes are supported by the storage engine for the given  ALGORITHM  clause (if any) and  ALTER TABLE  operation. Use  ADD  to add new columns to a table, and  DROP  to remove existing columns.  DROP  col_name  is a MySQL extension to standard SQL. To add a column at a specific position within a table row, use  FIRST  or  AFTER  col_name . The default is to add the column last. If a table contains only one column, the column cannot be dropped. If what you intend is to remove the table, use the  DROP TABLE  statement instead. If columns are dropped from a table, the columns are also removed from any index of which they are a part. If all columns that make up an index are dropped, the index is dropped as well. If you use  CHANGE  or MODIFY  to shorten a column for which an index exists on the column, and the resulting column length is less than the index length, MySQL shortens the index automatically. For  ALTER TABLE ... ADD , if the column has an expression default value that uses a nondeterministic function, the statement may produce a warning or error. For further information, see Section 11.6, “Data Type Default Values” , and Section 17.1.3.7, “Restrictions on Replication with GTIDs” . The  CHANGE ,  MODIFY ,  RENAME COLUMN , and  ALTER  clauses enable the names and definitions of existing columns to be altered. They have these comparative characteristics: •More convenient than  CHANGE  to rename a column without changing its definition. •Can change a column name but not its definition. • RENAME COLUMN : •With  FIRST  or  AFTER , can reorder columns. •More convenient than  CHANGE  to change a column definition without renaming it. •Can change a column definition but not its name. • MODIFY : •With  FIRST  or  AFTER , can reorder columns. •Has more capability than  MODIFY  or  RENAME COLUMN , but at the expense of convenience for some operations.  CHANGE  requires naming the column twice if not renaming it, and requires respecifying the column definition if only renaming it. •Can rename a column and change its definition, or both. • CHANGE : Renaming, Redefining, and Reordering Columns Adding and Dropping Columns • LOCK = EXCLUSIVE 2490