I imported a database with PHPMyAdmin. A lot of rows were useless and I ended up with 300 rows that get to the ID 5000 or more. How can I delete all current IDs and give them all a new IDs?
I have a column named Date with timestamp. It would be good to order the IDs by date but it’s not a big deal.
How would the query be?
To re-number all rows to have IDs from 1-n, try this:
First, run this to prevent the second query causing id collisions:
Then run this, which will re-number all ids 1-n in order of Date: