I have 117,000 records in a table, and unfortunately I'm deciding "after the fact" to add a n auto_increment id column. How do I update the existing records with serial numbers?
The last time I found myself in that situation, I sent the data to a file using SELECT...INTO <outfile> query, deleted all data from the table, added the auto_increment column, then reimported the data using a LOAD DATA...INFILE query.
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.