When I delete a row from my table, the rowID number is deleted; this means that the rowIDs are not truly sorted any more. In this case, I want to reset the rowID such that the new IDs will be sorted and consecutive. I tried to do this with ALTER TABLE :
ALTER TABLE my_table DROP ID;
ALTER TABLE my_table AUTO_INCREMENT = 1;
ALTER TABLE my_table ADD ID int UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;
... but this doesn't work. How can I get the consecutive numbers?