原文:http://blog.csdn.net/qq_33733970/article/details/77799068

show create table \G

alter table userinfo auto_increment=20

desc userinfo:拿到表的描述信息如下 
mysql中设置主键步长

show session variables like ‘auto_in%’ 
mysql中设置主键步长

set session auto_increment_increment=2; 
mysql中设置主键步长

show global variables like ‘auto_incre%’; 
set global auto_increment_increment=20;

相关文章: