Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Queries/Paging
mlecza_at_my-deja.com wrote:
>
> Has anyone come up with a scalable solution to handle paging large
> queries? For example, if I have a web page that return a recordset of
> 2000 record - I do not want to display all 2000 records on one page.
>
In SQL try this:
select rn, col_1, col_2
(select rownum rn, col_1, col_2
from YOUR_TABLE )
where rn between :START_ROW and :END_ROW
order by col_1
Pay attention to that u cannot use ORDER BY clause in nested select.
> It would also be nice if I did not have to run the same query (that
> comes back with 2000 records) each time they went to the next page.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Thu Oct 14 1999 - 08:29:31 CDT
![]() |
![]() |