--rank 排序显示
---并列2的后面是3
select e.empno,e.ename,dense_rank() over(partition by deptno order by e.sal) od
from scott.emp e
---并列2的后面是4
select m.empno,m.ename,rank() over(partition by m.deptno order by m.sal)
from scott.emp m
---取排列的某个区段的值
select *
from (select e.empno,e.ename,dense_rank() over(partition by deptno order by e.sal) od
from scott.emp e) t
where t.od<=3 and t.od>=2
阅读(927) | 评论(0) | 转发(0) |