Guest User

Untitled

a guest
Aug 20th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. StringBuffer pagingSelect = new StringBuffer( sql.length()+100 );
  2. if (hasOffset) {
  3. pagingSelect.append("select * from ( select row_.*, rownum rownum_ from ( ");
  4. }
  5. else {
  6. pagingSelect.append("select * from ( ");
  7. }
  8. pagingSelect.append(sql);
  9. if (hasOffset) {
  10. pagingSelect.append(" ) row_ where rownum <= ?) where rownum_ > ?");
  11. }
  12. else {
  13. pagingSelect.append(" ) where rownum <= ?");
  14. }
Add Comment
Please, Sign In to add comment