ORA-06502:PL/SQL:数字或值错误:数值精度太高

今天在查看Oracle中Job后台运行的记录时,发现日志表中一直在报ORA-06502:PL/SQL:数字或值错误:数值精度太高

经判断是Number类型的使用不当。

number数据类型

number类型的语法很简单:number(p,s):

  • p:精度位,precision,是总有效数据位数,取值范围是38,默认是38,可以用字符*表示38。

  • s:小数位,scale,是小数点右边的位数,取值范围是-84~127,默认值取决于p,如果没有指定p,那么s是最大范围,如果指定了p,那么s=0。

p:isthe precision,or the total number of digits. Oracle guarantees the portabilityof numbers with precision ranging from 1 to 38.

s:isthe scale, or the number of digits to the right of the decimal point. The scalecan range from -84 to 127.

结论:在Oracle中使用Number类型时候,请一定保证其合适的精确度。

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值