Make values of a column sequential
You have a table
tbl
with an integer primary key column
keycol
which is not a key in another table, and which you wish to make perfectly sequential starting with 1.
SET @i=0;
UPDATE tbl SET keycol=(@i:=@i+1);