转载:https://blog.csdn.net/saygood999/article/details/102498385 注: to_char()函数的使用,是因为查询的数据乱码(数据集的问题),用to_char可以解决 oracle 12c不支持wm_concat,需要自己定义
select t.*,(select wm_concat(to_char(s.data_value)) from dev_common s where instr(t.attach_label_code,s.id)>0) name from relation t where attach_label_code is not null; 类比的也可以进行json 一一对应 原字段显示 [ “112”, “113” ]
张三,李四