(1)select mark, wm_concat(status) from DISSENT_INFO t GROUP BY mark;
查出来的数据
mark status
222 1007,1006
333 1008,1008
444 1008
(2)
SQL> select deptno,listagg(ename,',')within group(order by sal)name from emp group by deptno; DEPTNO NAME
---------- ----------------------------------------------------------------------------------------------------
10 MILLER,CLARK,KING
20 SMITH,ADAMS,JONES,FORD,SCOTT
30 JAMES,MARTIN,WARD,TURNER,ALLEN,BLAKE