Jump to content

Problem with auto-increment after manually changing a number in that field


sleepyw

Recommended Posts

One of the fields in my db assigns a unique number to every entry via auto-increment (for new items added). Right now, we're at about 5500. So a new item added would be 5501.

 

However, due to a problem I was trying to troubleshoot, I changed one of the key numbers to 9999 temporarily. After testing, I changed it back to its original number. However since then, new items added to the db started with 10000 and continued from there, even though I've renumbered the items. Is there a way to fix this?

 

EDIT: Solved using this method:

 

ALTER TABLE 'tablename' AUTO_INCREMENT=5501

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.