I have a table of 5700 records. The primary key is an integer. Now I noticed that some values are missing. Like this:
100 data 101 data 102 data 104 data >
Try this:
SET @var:=0; UPDATE `table` SET `id`=(@var:=@var+1); ALTER TABLE `table` AUTO_INCREMENT=1;