加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

关于PostgreSQL数据类型numeric的 precision和scale

发布时间:2020-12-13 16:40:59 所属栏目:百科 来源:网络整理
导读:关于PostgreSQL数据类型numeric的 precision和scale 参考自: https://www.postgresql.org/docs/10/static/datatype-numeric.html#DATATYPE-NUMERIC-TABLE We use the following terms below: The scale of a numeric is the count of decimal digits in the
关于PostgreSQL数据类型numeric的 precision和scale
参考自:
https://www.postgresql.org/docs/10/static/datatype-numeric.html#DATATYPE-NUMERIC-TABLE
We use the following terms below: 
The scale of a numeric is the count of decimal digits in the fractional part,to the right of the decimal point. 
The precision of a numeric is the total count of significant digits in the whole number,that is,the number of digits to both sides of the decimal point.

scale是小数点右边小数部分 小数的位数,

precision是小数点两边所有数字中,有效数字的位数。

the number 23.5141 has a precision of 6 and a scale of 4.

Integers can be considered to have a scale of zero.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读