Tutorial :MySQL table incrementing by 10 for some reason


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.


You have auto_increment_increment set to 10, change it back to 1.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »