Decimal Data Type
The decimal data type is an exact numeric data type defined by its precision (total number of digits) and scale (number of digits to the right of the decimal point). For example:
Specify the declaration using the following syntax:
decimal(p,s)
where
p=precision. The minimum precision for a decimal value is 1 and the maximum is 39.
s=scale. The scale of a decimal value cannot exceed its precision. Scale can be 0 (no digits to the right of the decimal point).
Valid synonyms for the decimal data type are dec and numeric.
Note: The decimal data type is suitable for storing currency data where the required range of values or number of digits to the right of the decimal point exceeds the capacities of the money data type. For display purposes, a currency sign cannot be specified for decimal values.
Last modified date: 08/28/2024