Hey I was wondering how I could fix my auto increment ID… it seems that everytime I add a row to the table, the ID is 1 off. So here’s an example.
My table currently looks like this:

Now, as you can see, the last element jumps from 198 to 200. I want this one to be 199.
So say I manually change that last value(200) to 199, it will obviously work, but the next time my script adds a row to the table, it will be on off again(201). Any idea how I could fix it? Thanks for any help, sh042067.
Jim’s right that you should find out the root cause of the ‘missing’ id.
But if you really just want to re-set the auto-increment counter, you can do this:
That should make the next auto-increment id value 200. (Assuming it’s MySQL)