本文转载自:https://www.cnblogs.com/LeiYang5237/p/6761183.html
一.oracle11g使用listagg() within group()函数
如图一
二 使用:select sname,ListAgg(to_char(hobby),',') within group (order by sname) as xhobby from newtest group by sname,结果如下图
如果全部合并可以用group by null。