In mysql database i have been deleting a lot of records. I have the primary key field called ID and set to auto_encrement. I would like to know is there is a way to make mysql use the freed up ID numbers coming from the deleted records.
The only way to cause MySQL to reuse numbers in an autoincrement is by performing "DELETE * from tablename". When it recieves that command, MySQL drops and recreates the table.
Why would you want to reuse the numbers? ______________________________________________________________________
TANSTAAFL!
I have been using the database to test my site for the last month and just had a lot of records of no value. I am rady to put the site up now and just wanted to start from 0 no other reason. thanks
I'd dump out the data you want to keep, perform "DELETE * from tablename", then repopulate. ______________________________________________________________________
TANSTAAFL!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.