首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >可以存储在格式号(6,-2)的甲骨文中的最大数目是多少?

可以存储在格式号(6,-2)的甲骨文中的最大数目是多少?
EN

Stack Overflow用户
提问于 2022-06-08 07:17:37
回答 1查看 38关注 0票数 0

我正在研究oracle数据库,我需要找到一个格式编号(P,S)的范围(最小,最大)。我知道这是正数,但不是负数。

例如正标度-

NUMBER(6,2) : {maximum:9999.99,minimum:-9999.99}

我不确定,但我认为负值应该是这样的-

NUMBER(7,-2) : {maximum:999999900,minimum:-999999900} // not sure

这是正确的吗?我找不到任何关于负尺度的解释,这里和那里只有几行。有人能帮忙吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-06-08 07:29:43

NUMBER(6, -2)中,精度为6位,小数位数为-2表示小数点右侧有-2位数字(或相当于小数点左侧的2位零位),因此最大数为99999900,最小数为-99999900 (数字被舍入到最近的100位)。

文献资料声明:

使用以下形式指定定点数字: 编号(p,s) 其中:

  • p是重要十进制数字的精度或最大数目,其中最重要的数字是最左边的非零数字,而最不重要的数字是最右的最已知的数字。Oracle保证数字的可移植性,其精度可达20位-100位,根据小数点的位置,这相当于39位或40位小数。
  • s是小数点到最小有效位的小数位数。标度范围从-84到127不等。
代码语言:javascript
复制
- Positive scale is the number of significant digits to the right of the decimal point to and including the least significant digit.
- Negative scale is the number of significant digits to the left of the decimal point, to but not including the least significant digit. For negative scale the least significant digit is on the left side of the decimal point, because the actual data is rounded to the specified number of places to the left of the decimal point. For example, a specification of (10,-2) means to round to hundreds.
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72541542

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档