redarrow
Expert Member
Anyone know how I can force or reset the "auto_increment" value in a MySQL table?
In my database I erased some entries which I had accidentally duplicated (due to a bug in my code) .. but now when I insert a new entry the auto_increment value is continuing where it left off... That is to say, the highest current auto incremented value in the table might be 5 but if I insert a new entry it gets assigned 9 and carries on from there..
How can I force MySQL to always continue from the highest current entry?
Thanks.
In my database I erased some entries which I had accidentally duplicated (due to a bug in my code) .. but now when I insert a new entry the auto_increment value is continuing where it left off... That is to say, the highest current auto incremented value in the table might be 5 but if I insert a new entry it gets assigned 9 and carries on from there..
How can I force MySQL to always continue from the highest current entry?
Thanks.