在ORACLE中,将varchar值更新为"00". [英] Update in ORACLE, varchar values with '00'.
本文介绍了在ORACLE中,将varchar值更新为"00".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大小为(6)的varchar字段中的值曾经显示为001234,现在它已转换为(8),但它们仍显示为001234,我希望它显示为00001234,并希望直接更新这些值
需要更新的列设置有约束.
请帮助
更新1:OP希望不使用LEN或REPLICATE来更新这些值.
Values in a varchar field which was of size (6) use to appear as 001234 now it have been converted to(8)but they still are appearing 001234 i want it to appear as 00001234 and want to update those values directly
the column needed to update is set with constraint.
please help
UPDATE 1: OP want to update those values without using LEN or REPLICATE
推荐答案
update table set field = lpad(field, 8, ''0'');
这篇关于在ORACLE中,将varchar值更新为"00".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文