Getting n of m rows in a query – Oracle 9i and +
select * from ( select a.*, rownum rnum from ( YOUR_QUERY_GOES_HERE — including the order by ) a where rownum <= MAX_ROWS ) where rnum >= MIN_ROWS
Tech Tips and Tricks
select * from ( select a.*, rownum rnum from ( YOUR_QUERY_GOES_HERE — including the order by ) a where rownum <= MAX_ROWS ) where rnum >= MIN_ROWS