-
from子查詢很重要查看全部
-
having和where區別:having可以使用組函數查看全部
-
單行子查詢和多行子查詢查看全部
-
decode(條件,判斷條件,ture返回,false返回); to_char(parameter,格式)返回新格式內容;查看全部
-
rownum 的規則,使用例:select row ,id,name from tem;查看全部
-
group by rollup(a,b)查看全部
-
WHERE 與 HAVING 的區別查看全部
-
having 過濾分組查看全部
-
group by 分組查看全部
-
where 和 having 的區別,。查看全部
-
select * from emp where deptno=(select deptno from dept where dname='SALES'); 使用多表查詢: select e.* from emp e,dept d where e.deptno=d.deptno and d.dname='SALES' ; 理論上應該盡量使用多表查詢,因為上面的子查詢有兩個from語句,所以要對數據庫訪問查詢兩次,而下面的多表查詢只訪問了一次!這是理論上的結論,并沒有考慮實際比如多表查詢中產生的笛卡爾積的大小,具體情況還是要具體對待。查看全部
-
where后面的子查詢中不能有分組函數 having后面的子查詢中可以有分組函數 select后面的子查詢得到的結果必須是單條記錄查看全部
-
(3)可以使用子查詢的位置:where,select,having,from (4)不可以使用子查詢的位置:group by查看全部
-
select deptno,job,sum(sal) from emp group by rool up(deptno,job) 意思是先以deptno job分組計算薪資 再以dept分組計算薪資 再無條件分組計算薪資 等價于 select deptno,job,sum(sal) from emp group by deptno,job + select deptno,sum(sal) from emp group by deptno + select sum(sal) from emp group by null查看全部
-
group by rollup(a,b) 按照條件a b分組查看全部
舉報
0/150
提交
取消