1.分組函數(shù)之AVG 的用法:查詢語(yǔ)句的格式:select avg(sal) ,sum(sal) from emp;
2.select min(sal),max(sal) from emp;//從員工表中查詢出最低工資和最高工資。
3.select count(*) from emp; //從員工表中查詢出員工的人數(shù)。
4.distinct的作用:去掉重復(fù)的記錄,相同記錄只顯示1次;。例如:select count(distinct deptno )from emp;
2.select min(sal),max(sal) from emp;//從員工表中查詢出最低工資和最高工資。
3.select count(*) from emp; //從員工表中查詢出員工的人數(shù)。
4.distinct的作用:去掉重復(fù)的記錄,相同記錄只顯示1次;。例如:select count(distinct deptno )from emp;
2015-07-11