I have a mysql table with more than 17000 rows in it. And I have deleted about 530 rows from some mid part of it. Now each row had a sequential AUTO-INCREAMENTED number primary key. As you can understand now several numbers for rows have been deleted. So i just wanted to ask that is there any way to fix all rows again in some flawless order?
Share
You can but be carefull of other tables using this primary key as a foreign key
this will update the
idcolumn of the tabletable… you then need to reset the auto_increment :This resets the next id to be
MAX(id)+1from the docs :