1. 程式人生 > >oracle將一個欄位拆分成多個值(regexp_substr函式)

oracle將一個欄位拆分成多個值(regexp_substr函式)

例:

select  regexp_substr(p.attributename, '[^,]+',1,level) c1
from tablename p 
connect by level <= length(p.attributename) - length(replace(p.attributename,',','')) + 1

結果