Using SQL Data Types in Database Applications

您所在的位置:网站首页 binary_double Using SQL Data Types in Database Applications

Using SQL Data Types in Database Applications

#Using SQL Data Types in Database Applications| 来源: 网络整理| 查看: 265

The SQL data types that store numeric data are NUMBER, BINARY_FLOAT, and BINARY_DOUBLE.

The NUMBER data type stores real numbers in either a fixed-point or floating-point format. NUMBER offers up to 38 decimal digits of precision. In a NUMBER column, you can store positive and negative numbers of magnitude 1 x 10-130 through 9.99 x10125, and 0. All Oracle Database platforms support NUMBER values.

The BINARY_FLOAT and BINARY_DOUBLE data types store floating-point numbers in the single-precision (32-bit) IEEE 754 format and the double-precision (64-bit) IEEE 754 format, respectively. High-precision values use less space when stored as BINARY_FLOAT and BINARY_DOUBLE than when stored as NUMBER. Arithmetic operations on floating-point numbers are usually faster for BINARY_FLOAT and BINARY_DOUBLE values than for NUMBER values.

In client interfaces that Oracle Database supports, arithmetic operations on BINARY_FLOAT and BINARY_DOUBLE values are performed by the native instruction set that the hardware vendor supplies. The term native floating-point data type includes BINARY_FLOAT and BINARY_DOUBLE data types and all implementations of these types in supported client interfaces.

Native floating-point data types conform substantially with the Institute of Electrical and Electronics Engineers (IEEE) Standard for Binary Floating-Point Arithmetic, IEEE Standard 754-1985 (IEEE754).

Note:

Oracle recommends using BINARY_FLOAT and BINARY_DOUBLE instead of FLOAT, a subtype of NUMBER .

Topics:

Floating-Point Number Components

Floating-Point Number Formats

Representing Special Values with Native Floating-Point Data Types

Comparing Native Floating-Point Values

Arithmetic Operations with Native Floating-Point Data Types

Conversion Functions for Native Floating-Point Data Types

Client Interfaces for Native Floating-Point Data Types

See Also:

Oracle Database SQL Language Reference for more information about data types



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3