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: how to fetch the first n rows only for a query

Re: how to fetch the first n rows only for a query

From: Telemachus <telemachus_at_ulysseswillreturn.net>
Date: Tue, 23 Jul 2002 14:23:07 +0100
Message-ID: <%Mc%8.4310$zX3.3523@news.indigo.ie>

interesting.. this is a stopkey plan isn't it ... does that incur the full fetch ?

this is the classic page-of-html results stuff

Tom K. did some good stuff with this on his site.

"Richard Foote" <richard.foote_at_bigpond.com> wrote in message news:fg1%8.41477$Hj3.124635_at_newsfeeds.bigpond.com...
> Hi Fran
>
> Try:
>
> SELECT ...
> FROM (SELECT ...
> FROM MyTable
> ORDER BY...)
> WHERE rownum < 10;
>
> This should get you the first (10) sorted rows.
>
> Good Luck
>
> Richard
> "Fan Ruo Xin" <fanruox_at_yahoo.com> wrote in message
> news:3D3C9D59.F05E87F9_at_yahoo.com...
> > Hi,
> > I have a very simple query like,
> > SELECT ...
> > FROM MyTable
> > WHERE
> > ORDER BY
> >
> > Both the tablesize of mytable and result size are very big. I only care
> > the first 10 or 20 rows from the result set. How to implement it in
> > ORACLE?
> > BTW, I searched SELECT stmt in SQL Reference, got no help.
> >
> > Regards,
> > Fan Ruo Xin
> >
>
>
Received on Tue Jul 23 2002 - 08:23:07 CDT

Original text of this message

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