select deptno ,wm_concat(ename) from emp GROUP BY deptno;--行转列 转载于:https://www.cnblogs.com/wangchuanfu/p/10988661.html