当前位置:首页 > 史上最全Oracle数据库基本操作练习试题含答案解析
WORD格式.分享
from emp) where 排名=4;
42.查找EMP表中前5条记录 。 select * from emp where rownum<=5;
43.查找EMP表中10条以后的记录 。
select * from (select e.*,row_number() over(order by empno) 排名 from emp e) where 排名>10;
44.查找EMP表中薪水第5高的员工 。
select empno from (select empno,rank() over(order by sal desc) as r from emp) where r=5;
45.查找EMP表部门30中薪水第3的员工 。
select empno from (select empno,rank() over(order by sal desc) as r from emp where deptno=30) where r=3;
46.查找EMP表中每部门薪水前3的员工。
select * from (select e.*,row_number() over(partition by e.deptno order by e.sal desc) 排名 from emp e) where 排名<=3;
精品.资料
共分享92篇相关文档