ORACLE 使用通配符进行字符串截取

ORACLE 使用通配符进行字符串截取

select
regexp_substr('aa--a(1-23),b---b(32---1)','[^(,)]+',1,1) as col1,
regexp_substr('aa--a(1-23),b---b(32---1)','[^(,)]+',1,2) as col2,
regexp_substr('aa--a(1-23),b---b(32---1)','[^(,)]+',1,3) as col3,
regexp_substr('aa--a(1-23),b---b(32---1)','[^(,)]+',1,4) as col4
from dual;

猜你喜欢

转载自www.cnblogs.com/loveSnowBaby/p/11578203.html
今日推荐