mysql设置步长

如果是mysql, 
执行命令:            
SHOW VARIABLES LIKE 'auto_inc%';
用上面的命令查看一下自增长的步长,看是不是1,如果是2的话,就用
SET @auto_increment_increment=1;
设置一下,应该就可以了。

奇数增长
auto_increment_increment=2
auto_increment_offset=1
偶数增长
auto_increment_increment=2
auto_increment_offset=2

猜你喜欢

转载自pengfeifei26.iteye.com/blog/1924516