1、按字符分割字符串,并返回分组后的每个数据

  select regexp_substr('1,2,3','[^,]+',1,level,'i') from dual connect by level <= length('1,2,3') -length(regexp_replace('1,2,3',',',''))+1;

2、位数不够补齐

  向左补齐:select LPAD('AAA',5,'0') from dual;

  向右补齐:select RPAD('AAA',5,'0') from dual;

posted on 2022-04-03 21:22  vofill-work  阅读(42)  评论(0编辑  收藏  举报