Oracle合并某一列
一.oracle11g使用listagg() within group()函数
如图一

二 使用:select sname,ListAgg(to_char(hobby),',') within group (order by sname) as xhobby from newtest group by sname,结果如下图

一.oracle11g使用listagg() within group()函数
如图一

二 使用:select sname,ListAgg(to_char(hobby),',') within group (order by sname) as xhobby from newtest group by sname,结果如下图
