The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Reset ID(int) to last + 1? Re: Reset ID(int) to last + 1?


I am sure this could probably be simplified into a single query along the lines of

ALTER TABLE imgtable AUTO_INCREMENT = (( SELECT MAX(id) FROM imgtable ) + 1 )

but that is even more untested and off the top of my head ;)