Did you know this about AUTO_INCREMENT?

The AUTO_INCREMENT feature of MySQL is the easiest way to generate an automatic sequence of incrementing values for a primary key. It’s very easy to use, too: create table t ( i integer auto_increment, other_field varchar(100), primary key(id) ); There some features and “features” that you have to keep in mind when using AUTO_INCREMENT, though.