-
select avg(sal) from emp group by deptno; ---計算部門的平均工資。 select max(avg(sal)) from emp group by deptno;--計算部門的平均工資的最大值。查看全部
-
connect by prior a=b start with a=*** connect by prior a=b start with b is null查看全部
-
break up deptno skip 2 部門號只顯示一次,不同部門號之間跳過2行查看全部
-
示例一: 分頁查詢顯示員工信息:顯示員工號,姓名,月薪 要求:(1)每頁顯示四條記錄 (2)顯示第二頁的員工 (3)按照月薪降序排列 注意:rownum只能使用<,<=,不能使用>,>= Oracle 通過拼接子查詢方式實現分頁操作 select r,empno,ename,sal from (select rownum r,empno,ename,sal from (select rownum,empno,ename,sal from emp order by sal desc) e1 where rownum<=8) e2 where r>=5; 查看偽列的行號 select rownum,r,empno,ename,sal from (select rownum r,empno,ename,sal from (select rownum,empno,ename,sal from emp order by sal desc) e1 where rownum<=8) e2 where r>=5;查看全部
-
返回單行數據的為單行子查詢,返回多行數據的為多行子查詢查看全部
-
where,select,having,from 這些位置可以使用子查詢查看全部
-
where子句中不能使用組函數查看全部
-
having中可以使用組函數,where中不可以。查看全部
-
distinct 去掉重復查看全部
-
select ci_id,wm_concat(stu_name) stu_name from (select ci_id,stu_name from pm_ci c,pm_stu s where instr(c.stu_ids,s.stu_id)>0) t group by ci_id;查看全部
-
分組查詢:group by查看全部
-
子查詢中的空值查看全部
-
子查詢的注意問題查看全部
-
層次查詢的原理查看全部
-
層次查詢查看全部
舉報
0/150
提交
取消