Reset auto increment after deleting a table row
Reset auto increment after deleting a table row
qwertyuiopasdf
Posts: 1Questions: 1Answers: 0
I have a MySQL table with an auto increment primary key. I deleted some rows in the middle of the table. Now I have, for example, something like this in the ID column: 12, 13, 14, 19, 20. I deleted the 15, 16, 17 and 18 rows.
I want to reassign / reset / reorder the primary key so that I have continuity, i.e. make the 19 a 15, the 20 a 16, and so on.
How can I do it?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
That's not really a DataTables question. You should try MySQL forums.