Oracle ORA-01438值不';t适合定义的数字(11,7)数据类型

Oracle ORA-01438值不';t适合定义的数字(11,7)数据类型,oracle,oracle11g,Oracle,Oracle11g,我理解数字数据类型的概念,并从本页获得信息 然而,看起来我仍然错过了一些东西,因为我不太明白为什么会出现这个错误ORA-01438: select cast (18000.0 as number(11,7)) from dual; 导致 ORA-01438: value larger than specified precision allowed for this column 01438. 00000 - "value larger than specified precision al

我理解数字数据类型的概念,并从本页获得信息

然而,看起来我仍然错过了一些东西,因为我不太明白为什么会出现这个错误ORA-01438

select cast (18000.0 as number(11,7)) from dual;
导致

ORA-01438: value larger than specified precision allowed for this column
01438. 00000 -  "value larger than specified precision allowed for this column"
*Cause:    When inserting or updating records, a numeric value was entered
           that exceeded the precision defined for the column.
*Action:   Enter a value that complies with the numeric column's precision,
           or use the MODIFY option with the ALTER TABLE command to expand
           the precision.
同时,将音阶从7降到6也是一种魅力

select cast (18000.0 as number(11,6)) from dual;
这是在“Oracle Database 11g Enterprise Edition 11.2.0.4.0版-64位生产”下发生的

有人能告诉我为什么会这样吗

谢谢,感谢您的帮助。

数字(11,7)
允许总数为11位和7位小数的数字。这意味着你有11-7=4个非小数位数


18000
五个非小数位数太多了

谢谢你的评论,我混淆了11是总位数还是非小数位数的事实。