已采納回答 / 慕設計3861347
你使用的函數是多行換成一列顯示對嗎?oracle中的函數是wm_concat(),mysql的group_concat()中的行合并成列顯示的情況。
2015-07-11
1.分組函數之AVG 的用法:查詢語句的格式:select avg(sal) ,sum(sal) from emp;
2.select min(sal),max(sal) from emp;//從員工表中查詢出最低工資和最高工資。
3.select count(*) from emp; //從員工表中查詢出員工的人數。
4.distinct的作用:去掉重復的記錄,相同記錄只顯示1次;。例如:select count(distinct deptno )from emp;
2.select min(sal),max(sal) from emp;//從員工表中查詢出最低工資和最高工資。
3.select count(*) from emp; //從員工表中查詢出員工的人數。
4.distinct的作用:去掉重復的記錄,相同記錄只顯示1次;。例如:select count(distinct deptno )from emp;
2015-07-11