Oracle中引入了两种新的数据类型:binary_float和binary_double。这两种数据类型是对number数据类型的补充。
Binary_float:存储一个单精度的32位浮点数。
Binary_double:存储一个双精度的64位浮点数。
number 可存储整型、也可存储小数,但存储小数时数据被格式化了,如283038.55803527放在库里可能变成283038.558035270016000,这是拿number(30,15)类型的数据做为例子来说。
他们的优点:
1. 需要的存储空间较小:Binary_float需要5个字节,Binary_double需要9个字节,number需要32个字节。
2. 可以表示的数字范围更大
3. 执行运算的速度更快:binary_float和binary_double类型通常是在硬件中执行运算,而number类型在运算之前首先使用软件进行转换。
4. 运算封装:对binary_float和binary_double类型进行的数学运算是封装的,也就是说结果要么是数字,要么是一个特殊值。
5. 取整透明:binary_float和binary_double类型使用2进制来表示数字,而number则使用十进制来表示。
下面是关于 binary_float和binary_double的4个特殊值
<!-- [if gte mso 9]><xml><w:WordDocument><w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel><w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery><w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery><w:DocumentKind>DocumentNotSpecified</w:DocumentKind><w:DrawingGridVerticalSpacing>7.8</w:DrawingGridVerticalSpacing><w:View>Normal</w:View><w:Compatibility></w:Compatibility><w:Zoom>0</w:Zoom></w:WordDocument></xml><![endif]-->
特殊值 |
描述 |
Binary_float_nan |
非binary_float 类型的数字 (nan) |
Binary_float_infinity |
Binary_float类型的无穷大 (inf) |
Binary_double_nan |
非binary_double 类型的数字 (nan) |
Binary_double_infinity |
Binary_double类型的无穷大 (inf) |
相关推荐
The new datatypes BINARY_FLOAT and BINARY_DOUBLE can improve performance in number-crunching applications, such as processing scientific data. Native compilation is easier and more integrated, with ...
Both syntaxes support triple and double register operands: "add r0,r0,r1" can be shortened to "add r0,r1" _______________________________________________________________________________ 3. IT ...
16.2. binary_float和binary_double 83 16.3. 伪列 84 十七、 表和约束 84 17.1. 创建表 84 17.2. 管理表中的列 86 17.3. 重命名表 87 17.4. 移动表 87 17.5. 删除表 88 17.6. 约束分类 88 17.7. 查看约束 93 17.8. ...
- Bug 5087402: BINARY_FLOAT and BINARY_DOUBLE columns are always formatted using dot as the decimal separator. When values of these datatypes are inserted or updated, the decimal separator must ...
12.4.2 BINARY_FLOAT/BINARY_DOUBLE类型的语法和用法 513 12.4.3 非固有数值类型 513 12.4.4 性能考虑 514 12.5 LONG类型 515 12.5.1 LONG和LONG RAW类型的限制 516 12.5.2 处理遗留的LONG类型 517 12.6 DATE...
by Ashlyn Black via cheatography.com/20410/cs/3196/Number LiteralsIntegers0b11111111 binary 0B11111111 binary0377 octal 255 decimal0xff hexadecimal 0xFF hexadecimalReal Numbers88.0f / 88.1234567...
myString = NumberFormat.getInstance().format(myNumber); 若要格式化不同 Locale 的日期,可在调用getInstance方法时指定它。 NumberFormat nf = NumberFormat.getInstance(Locale.FRENCH); 方法 说明 ...
支持的数据类型包括:NUMBER, CHAR, VARCHAR2, NCHAR,NVARHCAR2, LONG, DATE, RAW, LONG RAW, BLOB, CLOB, TIMESTAMP (9i+) , BINARY FLOAT, BINARY DOUBLE (10g+) 全面支持LOB字段: 支持CLOB、NCLOB和BLOB CLOB...
支持的数据类型包括:NUMBER, CHAR, VARCHAR2, NCHAR,NVARHCAR2, LONG, DATE, RAW, LONG RAW, BLOB, CLOB, TIMESTAMP (9i+) , BINARY FLOAT, BINARY DOUBLE (10g+) 导出的数据格式包括纯文本和DMP文件两种。以纯...
5.支持的数据类型包括:NUMBER, CHAR, VARCHAR2, NCHAR,NVARHCAR2, LONG, DATE, RAW, LONG RAW, BLOB, CLOB, TIMESTAMP (9i ) , BINARY FLOAT, BINARY DOUBLE (10g ) 6.全面支持LOB字段:支持CLOB、NCLOB和BLOBCLOB...
Overview Package Class Tree Deprecated Index Help PREV NEXT FRAMES NO FRAMES A B C D E F G H I J L P R S U V -------------------------------------------------------------------------------- ...
GreenCppC 2008-8-24 ========================================= // I 类,对象,函数重载 //-------- From C to C++ ------------ // A simple C Program! // convert a string to uppercase!...
)).0.9.3b- Many changes, I added a SakMsg component that make send binary attachments a snap. But have one problem, if you send as attach a file > 20 Kb, it doesn‘t work (I don‘t know why, maybe a ...
目录 序 ............................................................................................... 17 前言 ...........................................................................................
Data Organization 1.2.1 - Bits 1.2.2 - Nibbles 1.2.3 - Bytes 1.2.4 - Words 1.2.5 - Double Words 1.3 - The Hexadecimal Numbering System 1.4 - Arithmetic Operations on Binary and ...