10g的 select a1,replace(wm_concat(a2),',','') from a group by a1
select a1,replace(max(sys_connect_by_path(a2,',')),',','') from (select a1,a2,row_number()over(partition by a1 order by rownum)rn from a) connect by prior rn=rn-1 start with rn=1 group by a1
select a1,replace(wm_concat(a2),',','') from a
group by a1
from (select a1,a2,row_number()over(partition by a1 order by rownum)rn from a)
connect by prior rn=rn-1
start with rn=1
group by a1
再对这个结果稍作处理
怎么说呢..很难说
学习下connect by的用法就知道了