已采纳回答 / Zayne137
--数据库在创建unique constraint的同时,强制创建或者重用列上的索引。如果之前列上没有索引,那么强制创建的索引是unique index,如果列上已经存在索引,就重用之前的索引。 所以你需要用drop index
2016-08-22
已采纳回答 / qq_铭记守护_03759679
create table mytest( id smallint primary key auto_increment , name varchar(20) not null, age smallint not null, city varchar(20) not null );alter table mytest drop city,add newcity varchar(30) not null;
2016-08-12