Precision and scale for DECIMAL and NUMERIC scalar functions
The default precision and scale used by the DECIMAL and NUMERIC scalar functions depend on whether NPS compatibility mode is being used.
The default precision and scale used by the DECIMAL and NUMERIC scalar functions depend on the
setting of the SQL_COMPAT global variable:
- When SQL_COMPAT='NPS' and the data type of the input expression is:
- DECIMAL, the default precision and scale are the same as the precision and scale of the input data.
- REAL or DOUBLE, the default precision is 15 and the default scale is 6.
- Otherwise, the default precision and scale are as described in DECIMAL or DEC scalar function.