2014年2月12日 星期三

[SQL]multiple rows into a single column



參考:https://community.oracle.com/message/3788432
select deptno,
       rtrim (xmlagg (xmlelement (e, ename || ',')).extract ('//text()'), ',') enames
from emp
group by deptno

沒有留言:

張貼留言