alter table customers change id id int not null auto_increment primary key;
如果 有主键就不需要primary key;
mysql修改已存在的表增加ID属性为auto_increment自动增长的方法
本文介绍如何使用SQL语句alter table改变MySQL中客户表的主键id属性,确保其为非空自增的整数类型,并设置为主键。
本文介绍如何使用SQL语句alter table改变MySQL中客户表的主键id属性,确保其为非空自增的整数类型,并设置为主键。
alter table customers change id id int not null auto_increment primary key;
如果 有主键就不需要primary key;

被折叠的 条评论
为什么被折叠?