把字符串按照分割符分解成不同的部分
程序员文章站
2022-06-12 17:14:21
...
select regexp_substr('A,B,C,D,E', '[^,]', 1, level, 'i') as str from dual connect by level = length('A,B,C,D,E') - length(regexp_replace('A,B,C,D,E', ',', '')) 1;
select regexp_substr('A,B,C,D,E', '[^,]+', 1, level, 'i') as strfrom dual
connect by level length('A,B,C,D,E') - length(regexp_replace('A,B,C,D,E', ',', '')) + 1;