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
posted @ 2012-12-10 14:32  杨斌_济南  阅读(2788)  评论(0编辑  收藏  举报