Creating a FIFO List in MySQL I work in Transportation/Freight and we have these things called "PRO" numbers or freight bill numbers, which you can think about as and Invoice and Tracking number for a shipment. 

Our carriers send us blocks of 2,000 sequential PRO #s at a time. Previously, we'd just work from Excel and mail-merge basically just printing off the barcode and changing the cell's color to keep track of what's been used.

We want to automate this process now in the system that creates the shipping documents. Creating the list of PRO #s in MySQL is easy. The problem is that each PRO # can only be used once, but we have multiple people generating shipping documents at any given time. 

How can I retrieve a single PRO # from the database and be certain I've only ever used it once?

I'm open to other solutions that are not SELECT based. Maybe I can game the AUTO_INCREMENT system MySQL uses and use an INSERT based system? That would possibly be easiest to implement but I think it could possibly cause problems and could possibly get quite messy and tedious to maintain.

EDIT:
This is a Multi-Tenant system and transactional as well.
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