Liron Amitzi Oracle ACE

Oded Raz Oracle ACE Director

Paging Oracle Query Result

Posted by Oded Raz on Feb 7th, 2010 and filed under Oracle, Tips & Tricks. You can follow any responses to this entry through the RSS 2.0. You can leave a response or trackback to this entry

Programmers often retrieve big result set using queries and need to split them up in order to display the result correctly.  Just replace the inner query with the original one see tag <PUT YOUR MAIN QUERY>, and UPPERBUOND, :LOWERBOUND with the boundary of the results you want to display.

SELECT *
FROM (SELECT a.*, rownum rnum 
      FROM ( <PUT YOUR MAIN QUERY> ) a 
      WHERE rownum <= :UPPERBUOND
     )
where rnum >= :LOWERBOUND

1 Response for “Paging Oracle Query Result”

  1. scott tiger says:

    isn’t it Tom Kyte way?

Leave a Reply

Security Code:

Log in / Advanced NewsPaper by Gabfire Themes