• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to retrieve the last 10 records in a table.

 
Jimmy Jin
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The last 10 records that meet some conditions.
something like:
select startTime, endTime, runStatus from tableName
where runStatus = 'successful'
The statement above retrieve all the records,
but only the newest 10 records is needed,
assuming all newly added records are appended to the tail of the table.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65342
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This very topic was covered recently here.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic