Nice link Murat.

Looks like the answer is to do an inner query for the order by and the outer
query does the where.

SELECT *
FROM   (SELECT * FROM my_table ORDER BY col_name_1 DESC)
WHERE  ROWNUM < 10;

-Kevin

----- Original Message -----
From: "Murat Demirci" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, October 15, 2003 7:38 AM
Subject: FW: Top n in Oracle

> There are some solutions at http://www.orafaq.org/faqsql.htm.
>
> -----Original Message-----
> From: Murat Demirci [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 15, 2003 3:32 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Top n in Oracle
>
>
> did you try "... where rownum <= 3 ... " ?

[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to