oracle字符串转数组

方式一:
select regexp_substr('1,2,ds','[^,]+', 1, level, 'i') as arr from dual connect by level <= length('1,2,ds')-length(regexp_replace('1,2,ds', ',', ''))+1
方式二:
select regexp_substr('z,dfa,3','[^,]+',1,Level) as arr from dual connect by level <= length(REGEXP_REPLACE('z,dfa,3','[^,]+'))+1

本文链接:https://my.lmcjl.com/post/8079.html

展开阅读全文

4 评论

留下您的评论.