Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Limit number of records returned in a query in 8i.

Re: Limit number of records returned in a query in 8i.

From: Joe Condle <condle_at_mars-systems.com>
Date: 2000/07/03
Message-ID: <3960D3C1.E0EFD7B6@mars-systems.com>#1/1

"Thomas J. Kyte" wrote:

> the way to do it is still with rownum. In 8i, you can do any query
> with it:
>
> select *
> from ( select rownum r, a.*
> from ( <YOUR QUERY GOES HERE, ORDER BYS and ALL ) A
> where rownum <= :MAXROW_TO_FETCH )
> where r >= :MIN_ROW_TO_FETCH;
>
> in that fashion you can get rows N through M or just use the inner
> query to get rows less then M
>

Thank You

-- 
Joseph P. Condle                   condle_at_mars-systems.com
Systems Analyst II                     Office
412-473-6542                
Medical ARchival Systems, Inc. (MARS)  Pager  412-572-9490
1370 Beulah Road  Pgh. Pa. 15235       Fax    412-473-6538
Received on Mon Jul 03 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US