Loading

try_add

Scalar function

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

try_add(UINT256, UINT256)

Parameters

Name Type
a UINT256
b UINT256

Returns

Name Type
sum UINT256
1
SELECT try_add(balance, deposit) AS new_balance;
Notebook ready in readonly mode.