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: selecting rows from select

Re: selecting rows from select

From: Rafal Jank <yankee_at_wp-sa.pl>
Date: Tue, 10 Apr 2001 20:34:40 +0200
Message-ID: <3AD35240.636F67D9@wp-sa.pl>

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

Original text of this message

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