Выберите последнюю строку из таблицы SQL
SELECT * FROM TableName WHERE id=(SELECT max(id) FROM TableName);
Ugly Unicorn
SELECT * FROM TableName WHERE id=(SELECT max(id) FROM TableName);