Suppose I have 2k rows with current highest auto_increment value being 2000. Now, if i delete, say, 1000 rows from the top (1001 to 2000), the auto_increment still continues from 2001 instead of 1001. This results in needless high values of auto_increment. Is there a way to even "auto-adjust" this?
I tried something like below but it doesn't work
ALTER TABLE `updatelogs` AUTO_INCREMENT = (select max(update_id) from updatelogs);