Feb 19
Fetch Rows between X and Y in Oracle
Uncategorized Add comments
If you want to fetch the results between Xth row and Yth row in an Oracle resultset, here is the most optimal solution.
This works in Oracle 8.1 and above.
select *
from ( select a.*, rownum rnum
from
( YOUR_QUERY_GOES_HERE
-- including the order by ) a
where rownum < = MAX_ROWS )
where rnum >= MIN_ROWS
source : Ask Tom
Tags: oracle














