1. 程式人生 > >mysql不需要拷貝表的三種DDL

mysql不需要拷貝表的三種DDL

DDL 拷貝表

我們知道mysql5.6才支持部分的online ddl,但是以下三種ddl的寫法是不需要拷貝表的:

字段註釋
alter table testtable change testcolumn testcolumn int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT ‘修改後的字段的註釋‘;

表註釋
alter table testtable comment ‘修改後的表的註釋‘;

修改默認值
alter table testtable alter column testcolumn set default 0;

mysql不需要拷貝表的三種DDL