ALTER COLUMN

Used to set or remove the default value for a column. Example:

;
;

CHANGE COLUMN

Used to rename a column, change its datatype, or move it within the schema. Example:

;
;

MODIFY COLUMN

Used to do everything CHANGE COLUMN can, but without renaming the column. Example:

;

The official documentation for ALTER TABLE (for MySQL 5.1) is here.

 

出处:https://hoelz.ro/ref/mysql-alter-table-alter-change-modify-column

相关文章: