what is the format for using top keyword in oracle 9i? i have to retreive top 10 records..
+2
A:
Use the RANK function as in...
select
*
from
(select empno,sal,rank()
over (order by sal desc ) rnk
from emp)
where rnk <= 5;
query was taken from here
Konstantinos
2009-04-09 06:54:46
+1 for solution that works with Oracle 9i. ROWNUM is not supported in 9i.
Bill Karwin
2009-04-09 07:01:38
+1
A:
You can use the rownum keyword
SELECT * FROM (your ordered query) WHERE ROWNUM <= 10
CMS
2009-04-09 06:55:02