Win a copy of Mastering Non-Functional Requirements this week in the Design forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

recent entries from the database  RSS feed

 
ramanuja varun
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to retrieve the most recent entries from the database.If yes please do mention.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need to modify your data model to do this. You can add a modify date field to your table and select all those records after a chosen date.
 
Campbell Ritchie
Sheriff
Posts: 54483
150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or if you have an auto-increment column, "id", try select . . . where id = max(id) . . .
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!