Is there any simple way to implement pagination in sybase?
In postgres there are limit and offset in mysql there is limit X,Y. What about sybase? There is top clausure to limit results but to achieve full pagination there is also offset needed.
It is not a problem if there are a few pags, I can simply trim results on the client side, but if there are millions of rows I would like to fetch only data that I need.
Is there any simple way to implement pagination in sybase? In postgres there are
Share
Quoting from http://www.isug.com/Sybase_FAQ/ASE/section6.2.html#6.2.12:
You can set a maximum
rowcount, which will limit the number of rows returned by any particular query:That limit will apply until it is reset:
You could select into a temporary table, then pull data from that:
You could optimize storage on the temp table by storing only ID columns, which you then join back to the original table for your select.
The FAQ also suggests other solutions, including cursors or Sybperl.