Possible Duplicate:
MySQL - Auto Increment after delete
I want to delete the last inserted ID on my database and restart the numbers.
For example:
ID = 1, 2, 3, 4, 5
If I delete 5, after I add again the ID should still be 5.
I think it's ok to delete as I will just delete to the last inserted Id, so my data will not be unorganized.
My key is AUTO_INCEMENT
and NOT NULL
.
Additional restriction:
If I have data (1,2,3,4,5)
, then 5
is the only one who is subject for deletion.