Jared,

Probably it is not clear from my post, but ROWNUM is still useless WITHOUT
an order by. And original poster had no clue on what to order by to start
with.

Raj
______________________________________________________
Rajendra Jamadagni              MIS, ESPN Inc.
Rajendra dot Jamadagni at ESPN dot com
Any opinion expressed here is personal and doesn't reflect that of ESPN Inc.

QOTD: Any clod can have facts, but having an opinion is an art!


-----Original Message-----
Sent: Thursday, August 15, 2002 2:43 AM
To: Multiple recipients of list ORACLE-L

Rownum is not necessarily useless for this kind of query. In versions of
Oracle (8i+) where an inline view can include an order by, it can be rather
useful.

Top 5 salaries:

select ename, sal
from (
   select ename, sal
   from scott.emp
   order by sal desc
) a
where rownum < 6

Jared
*********************************************************************This e-mail 
message is confidential, intended only for the named recipient(s) above and may 
contain information that is privileged, attorney work product or exempt from 
disclosure under applicable law. If you have received this message in error, or are 
not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 
and delete this e-mail message from your computer, Thank 
you.*********************************************************************2

Reply via email to