Page 1 of 1

paging for Oracle database

Posted: Tue Jun 14, 2005 6:51 am
by localhost
I have searched alot but have not been able to find a solution for paginating result from oracle...do you guys have any idea? a sample code would be helpfull

Solved

Posted: Tue Jun 14, 2005 7:28 am
by localhost
select *
from ( select a.*, rownum rnum
from ( YOUR_QUERY_GOES_HERE -- including the order by ) a
where rownum <= MAX_ROWS )
where rnum >= MIN_ROWS

It will *not* work in 8.0 or before