oracle 根據逗號拼接的數據進行查詢,進行一一對應

注: 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;

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章