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: How to retrieve top 10 rows

Re: How to retrieve top 10 rows

From: Rui Anastácio <ranastacio_at_mail.telepac.pt>
Date: Thu, 17 Aug 2000 07:57:10 GMT
Message-ID: <399b9a95.85249522@news.telepac.pt>

On Thu, 17 Aug 2000 13:01:46 +1000, "Yulia" <yuliam_at_catuity.com> wrote:

>I do not know how to limit the number of rows
>returned by a query.
>In Sybase I could use "set rowcount 10".
>
>What does the same trick in Oracle?
>
>Yulia
>
>

Use rownum like this:

SELECT *
FROM TABLE
WHERE rownum <= 10    

Rui Anastácio Received on Thu Aug 17 2000 - 02:57:10 CDT

Original text of this message

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