Here's a MySQL question that I am sure others have faced:
I have a small number of rows in a table, say around 100, but records
come and go continuously, so there is constant deletion of old records
and insertion of new ones.
I could use auto_increment for the primary id, but because the records
are constantly cycling, I will eventually hit the upper limit of whatever
integer type is used for that id. Furthermore, space is wasted on anything
larger than an unsigned tinyint, since I know that I will never be near
255 records.
I am looking for an advanced auto_increment, which simply provides a
unique integer id, not necessarily an increment from the last one given.
Such an auto_increment would loop back to 1 after the integer limit
had been reached, and sequentially find the next id number that is
not already used.
Is there a simple way to do this? Am I missing something?
Many thanks, --charlie hileman.