NUMBER Data Type
来源:互联网 发布:学生赚钱的软件 编辑:程序博客网 时间:2024/05/17 09:03
Specify a fixed-point number using the following form:
NUMBER(p,s)
where:
p
is the precision, or the maximum number of significant decimal digits, where the most significant digit is the left-most nonzero digit, and the least significant digit is the right-most known digit. Oracle guarantees the portability of numbers with precision of up to 20 base-100 digits, which is equivalent to 39 or 40 decimal digits depending on the position of the decimal point.p相当于有效数字,最左边非零到最右边数字。
s
is the scale, or the number of digits from the decimal point to the least significant digit. The scale can range from -84 to 127.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.
s
正数包括最小有意义数,比如
.000127
NUMBER(4,5)
.00013
s是5,小数点右边第五位是最小有意义的数,也就是从第五位四舍五入( including the least significant digit)如果是负数,不包括最小有意义数,比如:
123.89
NUMBER(6,-2)
100
最小有意义数是百位(从百位四舍五入的),而-2是个位,( not including the least significant digit)参考:http://docs.oracle.com/cd/E11882_01/server.112/e26088/sql_elements001.htm#SQLRF00222
- NUMBER Data Type
- NUMBER Data Type
- NUMBER Data Type
- NUMBER Data Type
- Data Type
- Data Type
- DATA TYPE
- Data Type
- data-type,data-value
- Delphi Data Type to C# Data Type
- enum data type
- windows data type
- PLI Data Type
- DB2 Data Type
- data type : 数据类型
- Aggregate Function Data Type
- SQLServer data type precedence
- Part Two Data Type
- 国际C语言混乱代码大赛优胜作品详解之“A clock in one line”
- js控制多选框左右移动
- POJ 2965 The Pilots Brothers' refrigerator(BFS+二进制判重)
- 数据结构基础_插入字符串
- js控制多选框上下移动
- NUMBER Data Type
- 常见的目标检测中的背景建模方法漫谈
- 客户端验证总结
- backbone 重量级Web的MVC开发框架
- 你用或者不用:线程中synchronized关键字使用总结
- 高手的Blog 及ACM 好的网站
- 常用的javascript验证正则表达式
- 今年的学习计划
- javascript通用表单的验证函数