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`);