The Numeric data type of DB2
smallint, integer, decimal, decfloat, real, double
SMALLINT | Small integers. A small integer is binary integer with a precision of 15 bits. The range is -32768 to +32767. |
INTEGER or |
Large integers. A large integer is binary integer with a precision of 31 bits. The range is -2147483648 to +2147483647. |
BIGINT | Big integers. A big integer is a binary integer with a precision of 63 bits. The range of big integers is -9223372036854775808 to +9223372036854775807. |
DECIMAL or |
A decimal number
is a packed decimal number with an implicit decimal point. The position of
the decimal point is determined by the precision and the scale of the number.
The scale, which is the number of digits in the fractional part of the number,
cannot be negative or greater than the precision. The maximum precision is
31 digits.
All values of a decimal column have the same precision and scale. The range of a decimal variable or the numbers in a decimal column is -n to +n, where n is the largest positive number that can be represented with the applicable precision and scale. The maximum range is 1 - 10³¹ to 10³¹ - 1. |
DECFLOAT | A decimal floating-point value is an IEEE
754r number with a decimal point. The position of the decimal point is stored
in each decimal floating-point value. The maximum precision is 34 digits.
The range of a decimal floating-point number is either 16 or 34 digits of precision; the exponent range is respectively 10-383 to 10+384 or 10-6143 to 10+6144. |
REAL | A single-precision floating-point number is a short floating-point number of 32 bits. The range of single-precision floating-point numbers is approximately -7.2E+75 to 7.2E+75. In this range, the largest negative value is about -5.4E-79, and the smallest positive value is about 5.4E-079. |
DOUBLE | A double-precision floating-point number is a long floating-point number of 64 bits. The range of double-precision floating-point numbers is approximately -7.2E+75 to 7.2E+75. In this range, the largest negative value is about -5.4E-79, and the smallest positive value is about 5.4E-079. |