DECIMAL
type
Applies to: Databricks SQL Databricks Runtime
Represents numbers with a specified maximum precision and fixed scale.
Syntax
{ DECIMAL | DEC | NUMERIC } [ ( p [ , s ] ) ]
p
: Optional maximum precision (total number of digits) of the number between 1 and 38. The default is 10.
s
: Optional scale of the number between 0 and p
. The number of digits to the right of the decimal point. The default is 0.
Limits
The range of numbers:
-1Ep + 1 to -1E-s
0
+1E-s to +1Ep - 1
For example a DECIMAL(5, 2) has a range of: -999.99 to 999.99.