背景:配置信息存储分隔符字符串,用以业务流程中in操作符查询
示例:apple,orange,banana --> in ('apple', 'orange', 'banana')
用法:
select regexp_substr('apple,orange,banana','[^,]+', 1, level) from dual connect by regexp_substr('apple,orange,banana','[^,]+', 1, level) is not null
执行效果:
REGEXP_SUBSTR('APPLE,ORANGE,BA 1 apple 2 orange 3 banana