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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.