1

I'm trying to implement pagination in Hibernate for a native Sql Query. I am using Query query = Session.createSQlQuery(Sql_Query); for executing query. How can I implement/add pagination in it?

Harry Joy
  • 58,650
  • 30
  • 162
  • 207
Raju
  • 11
  • 1
  • 4

1 Answers1

0

AFAIK there is no default method for it, if you are using native sql then use limit and offset in your query to achieve the same.


EDIT 1

For your query in comment:

I'm not very much familiar with MS SQL but I found this pages that can help you to kick off:

Community
  • 1
  • 1
Harry Joy
  • 58,650
  • 30
  • 162
  • 207
  • Hey Harry,Thanks for the quick reply... I am new to MS SQL Database. so, Can u help me how to achieve this in MS Sql Server 2008 version ? – Raju Aug 05 '13 at 10:52