I want to select the last record from thousands of records, how to write the SQL query for that.
bhagat khetwal
0
Newbie Poster
Recommended Answers
Jump to Postwrite your select, order it in reverse order (o what you want is first) and add 'limit 1' at the end of the statement. That will give you exactly what would have been the last record before the change.
Sorry, I couldn't think of a way to demonstrate this …
Jump to PostOne answer to your question is given in the post immediately above yours in this thread from two years ago.
If you need more information you will probably have better luck in the Databases forum.
All 5 Replies
NextCom
8
Light Poster
Fest3er
39
Posting Whiz in Training
farukdeni
0
Newbie Poster
fxm
23
Posting Pro
Designer_101
-2
Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.