Select empno, ename, sal,r from (select empno,ename,sal,dense_rank() over (order by sal desc) r from emp) where r<=5;
OR
Select * from (select * from EMP order by sal desc) where rownum<=5;
OR
Select * from (select * from EMP order by sal desc) where rownum<=5;
No comments:
Post a Comment