插入的值不完全正确 [英] Inserted value not exactly right

查看:82
本文介绍了插入的值不完全正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在动态插入/更新Oracle DB表中的记录的程序中。我遇到了如下所述的1个问题:

对于以'0'开头的记录值(例如062),Oracle表中显示的值变为'62'而不是'062'。 '0'被截断了。怎么解决这个问题?谢谢。

解决方案

如果你插入数值或整数值类型,你会遇到这个问题。

尝试使用char或varchar类型

In a program that dynamically insert / update records in an Oracle DB table. I got 1 problem as described below:
For a record value beginning with '0' (e.g. 062), the value displayed in the Oracle table becomes '62' rather than '062'. The '0' got truncated. How can this be solved? Thanks.

解决方案

If you insert an numeric or integer value type, you will get this problem.
Try using a char or varchar type.


这篇关于插入的值不完全正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆