You can achieve optimal space savings for NUMBER data using either multivalue compression, algorithmic compression, or a combination of both.
NUMBER data is stored as a variable length field from 0 to 18 bytes in width. You can use the NUMBER type to represent both fixed point and floating point decimal numbers, depending on the syntax you use to specify the type. In the following table, the characters p and s represent precision and scale, respectively.
General Type | Syntax | Functional Description |
---|---|---|
Fixed point | NUMBER(p,s) | Similar to DECIMAL(p,s) |
NUMBER(p) | Similar to DECIMAL(p) | |
Floating point | NUMBER(*,s) | Floating point decimal with s fractional digits |
NUMBER | A floating point number | |
NUMBER(*) | Same as NUMBER |
The following table highlights the approximate equivalences/valid substitutions between the fixed and floating point NUMBER types with other exact (fixed point) and approximate (floating point) types.
NUMBER Type | Can Use NUMBER Data Type Where You Can Use These Data Types | Maximum Precision in Digits |
---|---|---|
Fixed point |
|
38 |
Floating point |
|
40 |
Whether a NUMBER type represents a fixed-point value or a floating-point value does not affect its storage or accuracy. See Numeric Data Types, Non-INTEGER Numeric Data Types, and NUMBER Data Type for more information about the NUMBER type.