Most DBMS's have some sort of built in max() function. Look at your DB providers manual to find the exact syntax.
Use that to get the maximum row for a particular field or group of fields.
May not nessesary return the last though... depends on your definition of last. Like xblue said, the last record generally has the highest iID number, that is unless you've been fiddling with them.
cya
-Adam 🙂