MySQL 8.0.29之前,在线 DDL 操作中即时添加列只能添加在表的最后一列
MySQL 8.0.29 扩展了对 ALTER TABLE … ALGORITHM=INSTANT 的支持:
用户可以在表的任何位置即时添加列、即时删除列、添加列时评估行大小限制
(root@node01) > alter table customer add column c_comment varchar(200);
Query OK, 0 rows affected (0.51 sec)
Records: 0 Duplicates: 0 Warnings: 0
(root@node01) > alter table customer drop column c_comment;
Query OK, 0 rows affected (0.13 sec)
Records: 0 Duplicates: 0 Warnings: 0
(root@node01) > alter table customer add column c_comment varchar(200) after c_delivery_cnt;
Query OK, 0 rows affected (0.10 sec)
Records: 0 Duplicates: 0 Warnings: 0
【MySQL 8.0】新特性:ALTER TABLE … ALGORITHM=INSTANT
原创dbprofessional 博主文章分类:MySQL ©著作权
©著作权归作者所有:来自51CTO博客作者dbprofessional的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
MySQL 8.0新特性
mysql 8.0 新特性
mysql 数据库 database JSON 重启 -
MySQL 8.0复制新特性
QL 8.0 仍然是 b.
mysql 数据 并行化 -
MySQL8.0索引新特性
持降序索引 在MySQL5.7和MySQL8.0中创建表 CREATE TABLE ts1(a int,b int,index idx_a
MySQL mysql 查询优化 执行计划 -
MySQL8.0-新特性-role
一、简介role可以看做一个权限的集合,这个集合有一个统一的名字role名。 OK
mysql oracle html