ORACLE的lpad函数、rpad函数用法
语法:select lpad('12345678',1,'0') from dual;
返回字符串‘12345678’的从左边长度为1的字符串,如果不够,左边补‘0’
语法:select rpad('12345678',1,'0') from dual;
返回字符串‘12345678’的从左边长度为1的字符串,如果不够,右边补‘0’
select rpad('12345678',1,0) from dual;
--------
1
select lpad('12345678',1,0) from dual;
--------
1
select rpad('12345678',10,0) from dual;
-------
1234567800
select lpad('12345678',10,0) from dual;
-------
0012345678