6-10사이의 랭킹

 

select ranking,empno,ename,sal
from(select rownum ranking,empno,ename, sal
  from(select empno,ename,sal
    from dura  order by sal desc))
where ranking between 6 and 10;

 

or

 

select ename,empno,sal,rank
from(select ename,empno,sal,rank() over(order by sal) as rank
  from dura )
where rank between 6 and 10;


다른 방법

select * from (select * From dura order by seq desc) where rownum = 1

+ Recent posts