oracle补零 (转)
oracle补零
1.前端补0: Sql代码 select lpad('345',8,'0') from dual; select to_char('345','00000000') from dual;
select lpad('345',8,'0') from dual; select to_char('345','00000000') from dual;
2.后端补0: Sql代码 select rpad('345',8,'0') from dual;
select rpad('345',8,'0') from dual;
原文:
http://blog.csdn.net/binnygoal/article/details/7989319