DECIMAL and NUMERIC are sql datatype used to represent a fixed point notation (exact number)
numeric is generally functionally identical to decimal.
With a DECIMAL(5,2):
The number 00123456.780 has:
NUMERIC(p, s)
DECIMAL(p, s)
where:
The Sql standard defined NUMERIC and DECIMAL in the following words:
Maximum storage sizes vary, based on the precision.
Precision | Storage bytes |
---|---|
1 - 9 | 5 |
10-19 | 9 |
20-28 | 13 |
29-38 | 17 |
For a precision of 38, the range of value is <math>-10^{38 +1} </math> through <math>10^{38}</math>