分组然后合并,然后去除XML标签
SELECT replace(replace(replace(xml2clob(xmlagg(xmlelement(name A, 【字段】))),'</A><A>', '【分隔符】'),'</A>',''),'<A>','') from 【表】 group by 【分组字段】
如:
SELECT replace(replace(replace(xml2clob(xmlagg(xmlelement(name A, nounid))),'</A><A>', ','),'</A>',''),'<A>','')
from SYS_NOUN
group by nounsuper