问题
The id field in a mysql table is incrementing by 10 (11, 21, 31) for some reason. Here is the table definition:
CREATE TABLE `clients` (
`id` int(11) NOT NULL auto_increment,
`first_name` varchar(255) default NULL,
`last_name` varchar(255) default NULL,
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8;
If I do a simple insert statement in SQL the next ID will be 41.
回答1:
You have auto_increment_increment set to 10, change it back to 1.
来源:https://stackoverflow.com/questions/993800/mysql-table-incrementing-by-10-for-some-reason