How to make an id auto_increment from where it last left off after a record delete?
- by Sammy
This isn't that big of a deal but I was wondering if it can be done. Right now when I insert a new record, the id field which is auto_increment and set as primary key increases it's value by one:
id | first_name | last_name
------------------------------
1 | John | Smith
2 | Jane | Doe
But if I delete record 2, the next one I insert is going to have an id of 3. Is there any way to make it have an id of 2 automatically (without having to manually insert it)?