orcale按逗号分割数据

orcale 按逗号分割数据
其中一列数据是由,拼接的,现在需要分割开

感谢大佬:旁观者sc

SELECT REGEXP_SUBSTR (a.id, ‘[^,]+’, 1,n) from table a ,( SELECT LEVEL n FROM DUAL CONNECT BY LEVEL <= 100 ) where n<=LENGTH (a.id) - LENGTH (regexp_replace(a.id, ‘,’, ‘’))+1;

具体函数用法就自己百度学学吧

你可能感兴趣的:(小坑大跳)