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;