使用场景如下:
oracle12 以前的写法:
select
t.pro_ids,
wm_concat(t1.name) pro_names
from info t,product t1
where instr(','||t.pro_ids|| ',',','|| t1.id|| ',') > 0
group by pro_ids
oracle12 以后的写法:
select
t.pro_ids,
listagg(DISTINCT t1.name,',') pro_names
from info t,product t1
where instr(','||t.pro_ids|| ',',','|| t1.id|| ',') > 0
group by pro_ids
参考原文:https://blog.csdn.net/x1107761900/article/details/88972610
https://blog.csdn.net/AlbenXie/article/details/102698460