mySql 修改字段自增

来源:互联网 发布:有哪些很污的淘宝店铺 编辑:程序博客网 时间:2024/05/22 03:18

 mySql 修改字段自增 

Alter table tb change id id int(10) not null auto_increment=1;//有问题

mysql> alter table newcar change id id int(11) not null auto-increment;//有问题

mysql> alter table newcar change id id int(11) not null AUTO_INCREMENT=1;//有问题

修改:alter table newcar change id id int(11) not null AUTO_INCREMENT;

 

删除

Alter table tb change id id int(10);//删除自增长

Alter table tb drop primary key;//删除主建