alter table test modify column `code` varchar(200);
alter table test change ret rets varchar(100) DEFAULT NULL COMMENT '返回值';  --修改字段名
ALTER TABLE test ADD `remark` varchar(500) DEFAULT '' COMMENT '备注';
ALTER TABLE test drop `name`; --删除字段
alter table test drop primary key,add primary key (`id`); --修改主键
alter table test drop index `id`;
alter table test add unique key `test_key` (`addr`,`name`);

  

 posted on 2022-10-11 11:15  boye169  阅读(13)  评论(0编辑  收藏  举报