多条数据进行合并成一条数据,逗号分隔

原始数据:

合并后的数据:


--id是你需要合并的字段

select listagg(id, ',') within group(order by id) as col_name

  from table

猜你喜欢

转载自blog.csdn.net/sinat_25378929/article/details/80910948