The following examples illustrate the functionality of NUMBER data type precision and scale:
Input Data | Specified As | Stored As |
---|---|---|
7,456,123.89 |
|
7456123.89 |
7,456,123.89 |
|
7456123.9 |
7,456,123.89 |
|
7456124 |
7,456,123.89 |
|
7456123.89 |
7,456,123.89 |
|
7456123.9 |
7,456,123.89 |
|
(not accepted, exceeds precision) |
7,456,123.89 |
|
7456100 |
If precision and scale are not defined then any number, which observes the following size can be stored:
-
Positive numbers in the range 1 x 10-130 to 9.99…9 x 10125 with up to 38 significant digits
-
Negative numbers from -1 x 10-130 to 9.99…99 x 10125 with up to 38 significant digits
-
Zero
-
Positive and negative infinity (generated only by importing from an Oracle Database, Version 5)
(source: http://docs.oracle.com/cd/B28359_01/server.111/b28318/datatype.htm#CNCPT313)