| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Displaying Oracle resultset in pages
Hello!
Check out asktom:
example:
SELECT *
FROM ( SELECT a.*, ROWNUM rnum
FROM ( SELECT * FROM hr.employees ORDER BY employee_id DESC ) a
WHERE ROWNUM <= &MAX_ROWS )
to get the first 25 records: MIN_ROWS=1 , MAX_ROWS=25
the next 25: MIN_ROWS=26, MAX_ROWS=50
...
The query performance will degrade when min_rows get high but that is usually not a problem because people usually dont check the records on "page 10" in google.
Regards,
Janne!
Erik wrote:
> Hi,
>
> I'd like to perform a search on an Oracle database and then display
> the resulting records over different pages, much like the way
> Google-searchresults appear. Can anybody tell me how the SQL would
> look like?
>
> Thanks,
> Erik
Received on Mon Nov 17 2003 - 08:32:13 CST
![]() |
![]() |