标签:
SQL代码
select REGEXP_SUBSTR(a.rolecode ,‘[^,]+‘,1,l) rolecode from ( select ‘a,aa,aaa‘ rolecode from dual ) a, (SELECT LEVEL l FROM DUAL CONNECT BY LEVEL<=100) b WHERE l <=LENGTH(a.rolecode) - LENGTH(REPLACE(rolecode,‘,‘))+1
标签:
原文地址:http://www.cnblogs.com/gdzhong/p/4726315.html