Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: selecting rows from select
Maciej Kwapulinski wrote:
>
> Hallo
> Can You tell if is there a possibility in oracle to get only first n
> rows from the result of 'select' query in oracle.
> Something simillar to 'top' in microsoft sql server
>
If you want to have them ordered, do something like:
select * from (select * from my_table order by column) where rownum<n;
(works fine under Oracle 8i)
Or use a cursor.
Rafal
Received on Tue Apr 10 2001 - 13:34:40 CDT
![]() |
![]() |