decimal

The decimal data type defines exact decimal numbers.

When specifying a decimal data type, you indicate the following characteristics of the type:
  • <precision>: The total number of digits in the value.

  • <scale>: The number of digits to the right of the decimal point.

In the software, the following relations must hold for <precision> and <scale>:

1 <= precision <= 28 (Oracle: 1<= precision <= 96 )

0 <= scale <= precision

The decimal value can have a plus or minus sign indicating a positive or negative value. The sign can appear before or after the value with any number of blanks between the value and the sign. Unsigned values are considered to be nonnegative. The sign does not count as part of <precision>.

Leading zeros are permitted in the integer digit, and trailing zeros are permitted in the fraction part.

Input that is more precise than the data type of the column or variable in which it is stored is rounded. Input out of range (absolute value is too large) causes a runtime error.

This data type allows NULL values.

The decimal data type and the numeric data type are identical in the software.