建表后修改id为自增长 alter table tb_name modify id int auto_increment primary key
设置初始增长值:alter table tb_name auto_increment = 1000;
获取表的当前增长值 SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='tb_name'
建表后修改id为自增长 alter table tb_name modify id int auto_increment primary key
设置初始增长值:alter table tb_name auto_increment = 1000;
获取表的当前增长值 SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='tb_name'