hi all
I have a table with a field for the id which is auto_incremented and a field for the names
I made a little script used for deleting rows.
let's say there are 6 rows with IDs (0001, 0002, 0003, 0004, 0005, 0006) and I delete the row with ID 0003, then I change the IDs (manually at the moment but I will write a script eventually) so the follow up on each other again, now I have the IDs 0001, 0002, 0003, 0004, 0005.
When I add another row using a script the new row will have an ID of 0007
can I set the auto_increment so that it will add just 1 to the last ID
I hope that makes sense,
Steve
can I reset a mysql database's auto_increment
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK