mysql不需要拷贝表的三种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;

猜你喜欢

转载自blog.51cto.com/chenql/2122445