try_multiply
function
Applies to: Databricks SQL Databricks Runtime 10.4 LTS and above
Returns multiplier
multiplied by multiplicand
, or NULL
on overflow.
Arguments
multiplier
: A numeric or INTERVAL expression.multiplicand
: A numeric expression or INTERVAL expression.
You may not specify an INTERVAL for both arguments.
Returns
If both
multiplier
andmultiplicand
are DECIMAL, the result is DECIMAL.If
multiplier
ormultiplicand
is an INTERVAL, the result is of the same type.If both
multiplier
andmultiplier
are integral numeric types the result is the larger of the two types.In all other cases the result is a DOUBLE.
If either the multiplier
or the multiplicand
is 0, the operator returns 0.
If the result of the multiplication is outside the bound for the result type the result is NULL
.