Home  >  Article  >  Database  >  Oracle ORA-01438

Oracle ORA-01438

WBOY
WBOYOriginal
2016-06-07 17:35:571581browse

ORA-01438: 值大于此列指定的允许精确度 比如定义为number(4,2),却要插入一个值200.12的话,就会出错啊,原因是number(p,s)的

ORA-01438: 值大于此列指定的允许精确度 
比如定义为number(4,2),却要插入一个值200.12的话,就会出错啊,原因是number(p,s)的问题。

number(p,,s),其中p表示该number的总长度,s为小数位。
如果s为负数,则会取相应位数的取整。
例如,如果number(4,-3),则数字1234的存储值为1000;如果number(4,-2),则数字1234的存储值为1200。

在对数据库表中的字段设定类型时,要注意:
NUMBER(10,6)  Double  带有小数
NUMBER(4)    Long

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn