Select last row in a table?
I have a SQL table named name. It contains 1000's of names. I enter new names to the table but I forgot what are these names. So I need to see last entered row using a query like select top(10)* from name.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Mar 25, 2014, 7:46 AM
SELECT TOP 1 * FROM table ORDER BY id DESC
Munesh SharmaPosted Mar 25, 2014, 7:56 AM
Select TOP 1 * FROM tablename ORDER BY id DESC
In mySql..
Select * FROM tablename ORDER BY id DESC Limit 1