Mysql自增字段的小常识

SHOW VARIABLES LIKE ‘auto_inc%’; //查看mysql当前查看当前数据库的自增长设置

auto_increment_increment //这是自增长的步长。

auto_increment_offset //这是自增长开始的值。

SET @@auto_increment_increment=3; //将自增长步长设置为3

SET @@auto_increment_offset=4; //将自增长开始值设置为4

猜你喜欢

转载自blog.csdn.net/liu_yang1314/article/details/83661550