https://dev.mysql.com/doc/refman/5.6/en/alter-table.html#alter-table-add-drop-column
源文档如下
Adding and Dropping Columns
Use ADD
to add new columns to a table, and DROP
to remove existing columns. DROP
is a MySQL extension to standard SQL.col_name
To add a column at a specific position within a table row, use FIRST
or AFTER
. The default is to add the column last.col_name
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.