Creating a FIFO List in MySQL
From here, you can do something like this

mysql&gt; CREATE TABLE autoinc (id MEDIUMINT NOT NULL AUTO_INCREMENT, sample INT, PRIMARY KEY(id));
Query OK, 0 rows affected (0.34 sec)

mysql&gt; INSERT INTO autoinc VALUES(NULL, 5);
Query OK, 1 row affected (0.05 sec)


mysql&gt; SELECT last_insert_id();
+------------------+
| last_insert_id() |
+------------------+
|                1 |
+------------------+
1 row in set (0.01 sec)

mysql&gt; 


[EDIT - in response to OP's comments]

"To start with an AUTO_INCREMENT value other than 1, set that value with 

CREATE TABLE or ALTER TABLE, like this: 
mysql&gt; ALTER TABLE tbl AUTO_INCREMENT = 100;" 

Also, this might help