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

Home -> Community -> Usenet -> c.d.o.server -> Re: FETCH a Specific Amount of Rows from Query

Re: FETCH a Specific Amount of Rows from Query

From: KULJEET <kuljeet_twtpl_at_hotmail.com>
Date: 22 Apr 2003 21:36:11 -0700
Message-ID: <febbed51.0304222036.16b85b39@posting.google.com>


gilgantic_at_yahoo.com (gilgantic) wrote in message news:<d6052717.0304220842.f348aac_at_posting.google.com>...
> Hi,
>
> I know in DB2 you can use the FETCH keyword to get a specific amount of rows
> from a query. Example, SELECT * FROM A FETCH FIRST 10 ROWS ONLY, will return
> on the first 10 rows of a result set. How is this done in Oracle 8i., or is
> it even possible? The FETCH keyword is used differently in Oracle 8i as I
> understand it.
>
> Thanks!
> Gil

apply two method
1.use rownum
2. use cursor and its property %rowcount for fetch limited no of rows like c1%rowcount<10 (c1 is cursor name)
for more help see oracle 8i documentation->pl/sql user guide in oracle cd Received on Tue Apr 22 2003 - 23:36:11 CDT

Original text of this message

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