Loading

try_mul

Scalar function

Multiply two UINT256 values, returning NULL if overflow occurs. Follows DuckDB's try_* convention for safe arithmetic.

try_mul(UINT256, UINT256)

Parameters

Name Type
a UINT256
b UINT256

Returns

Name Type
product UINT256
1
SELECT try_mul(amount, price) AS total;
Notebook ready in readonly mode.