已采納回答 / 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