Reputation: 141
I have a table in a mysql database, in which every row has an id column with auto increment. The id values start at 1, and end at 639.
What I need to do is change the id column of each row, so that the count doesn't begin at 1 but at 1924.
I tried this:
ALTER TABLE tablename AUTO_INCREMENT=1924;
but that doesn't seem to do what I need, it only resets the future count so that any future rows added start counting at 1924.
I need to change the existing ID values of existing rows.
How do I do that?
Upvotes: 2
Views: 2012