Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: how to fetch the first n rows only for a query
Hi Fran
Try:
SELECT ...
FROM (SELECT ...
FROM MyTable ORDER BY...)
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 Mon Jul 22 2002 - 19:24:49 CDT