in sqlite, there is a table called sqlite_sequence, this table contains the table name and it's last id number (if the id is auto incremented).
So, to get the last row in a table just put :
Select * from TABLENAME where id=(SELECT * from sqlite_sequence where name ='TABLENAME')