ciao,

se l'id e' autoincrementante puoi anche fare :

SELECT MAX(ID) FROM TABELLA ....