典型的用法,替换;生成多个数据行
select regexp_substr('i;am;a;test;hahahhah', '[^;]+',1,level) str_single
from dual
connect by level <= length('i;am;a;test;hahahhah') -
length(replace('i;am;a;test;hahahhah', ';', '')) + 1
order by str_single;
select regexp_substr('1 2 3', '[^ ]+',1,level) order_no
from dual
connect by level <= length('1 2 3') -
length(replace('1 2 3', ' ', '')) + 1
order by order_no;