2. Language Elements : Data Types : Numeric Data Types : Decimal Data Types
 
Share this page                  
Decimal Data Types
The decimal data type is an exact numeric data type defined in terms of its precision (total number of digits) and scale (number of digits to the right of the decimal point).
The following is an example of precision and scale in decimal values:
The minimum precision for a decimal value is 1 and the maximum precision is 39. The scale of a decimal value cannot exceed its precision. Scale can be 0 (no digits to the right of the decimal point).
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. Note that, for display purposes, a currency sign cannot be specified for decimal values.
Decimal Data Type Syntax
Specify the decimal data type using the following syntax:
decimal(p,s)
p
Defines the precision
s
Defines the scale
Note:  Valid synonyms for the decimal data type are dec and numeric.