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: select first x rows from a query

Re: select first x rows from a query

From: Yns <lovelyspam_at_england.com>
Date: 2000/06/12
Message-ID: <3944B535.38540D5A@england.com>#1/1

Marion wrote:
>
> Try:
>
> SELECT * FROM
> (SELECT col1
> FROM mytable ORDER BY col3 DESC)
> WHERE ROWID<4;
>
> This requires a full table scan, so it may be slower than other options
> if the table is very large.
>

What version of Oracle are you on?

I don't think the above will work - have you tested this?

Do you mean ROWNUM instead of ROWID?

                --Yunus



"Don't be suckered in by the comments - debug only the code." To reply by e-mail replace 'lovelyspam' with 'Yunus'.
Received on Mon Jun 12 2000 - 00:00:00 CDT

Original text of this message

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