mi sembra ci sia
codice:
SELECT MAX(`id`) FROM tabella