ORACLE(四) 行列操作

select wm_concat(id) from test1; --將多行轉換成1行,用','分割開  wm_concat


將1,2,3,4,5分成
1
2
3
4
5的形式
with t as (select '1,2,3,4,5' tt from dual)
select replace(regexp_substr(tt, '[^,]+', 1, level), ',', '')
  from t
connect by level <= length(tt) - length(replace(tt, ',', '')) + 1
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章