-
host cls 清除屏幕文字查看全部
-
count()查看全部
-
ttitle col 15 '我的報(bào)表' col 35 sql.pno col deptno heading 部門號(hào) col job heading 職位 col sum(sal) heading 工資總額 break on deptno skip 1查看全部
-
where 語句不能使用組函數(shù)查看全部
-
select distinct(deptno) from emp;查看全部
-
select min(sal),max(sal) from emp;查看全部
-
select avg(salary),sun(salary) from emp查看全部
-
select concat('go','od!'); > good!查看全部
-
多個(gè)列的分組:select deptno,job,sum(sal) from emp group by deptno,job order by deptno;查看全部
-
在select列表中所有未包含在組函數(shù)中的列都應(yīng)該包含在group by 字句中,包含在group by 字句中的列不必包含在select列表中查看全部
-
分組函數(shù)會(huì)自動(dòng)忽略空值:select count(*),count(comm) from emp; nvl函數(shù)使分組函數(shù)無法忽略空值:select count(*),count(nvl(comm,0)) from emp;查看全部
-
set linesize 200 col 部門中員工的姓名 for a60 select deptno 部門號(hào),wm_concat(ename) 部門中員工的姓名 from emp group by deptno;查看全部
-
分組函數(shù):作用于一組數(shù)據(jù),并對(duì)一組數(shù)據(jù)返回一個(gè)值。 avg sum min max count wm_concat:行轉(zhuǎn)列查看全部
-
Select a ,b,c ,sum(d) from m Group by a,b,c,d Select count(&),count(distinct a),count(nvl(b,0)) from m查看全部
-
nvl函數(shù) 使分組函數(shù)不忽略空值 使用方法:nvl(列名,自定義值) 當(dāng)列不為空時(shí)返回該值 當(dāng)列為空時(shí)返回自定義值查看全部
舉報(bào)
0/150
提交
取消