If you have an ID field, just get the record with the highest ID. Something like:
SELECT * FROM table WHERE Id = (SELECT Max(Id) FROM table)
You could also just do SELECT * FROM table ORDER BY Id DESC, and get a set with the newest record first. In the programming language you're using to execute the SQL commands, you could then just access the first record in the set.
|