oracle中字符串类型数据不全

来源:互联网 发布:网络语不腻是什么意思 编辑:程序博客网 时间:2024/06/06 06:05

update sys_adcdyear s set s.pcode=(select rpad(substr(t.code,1,2),'15','0') as code1 from sys_adcdyear t where t.lvl='3' and s.code=t.code) where lvl='3' 为pcode补全15位,全部为0

其中rpad为向右补全函数,其中的参数包括(param1,param2,param3) param1表示要补全的字段,param2表示补全位数,param3表示补全类型

0 0
原创粉丝点击