try_sub
Subtracts two UINT256 values. Arithmetic underflow produces NULL; independently, ordinary scalar NULL propagation produces NULL when either input is NULL.
Example
Local
{"id":"sample_s46b0s","title":"Sample","code":"SELECT try_sub(5::UINT256, 8::UINT256)::VARCHAR AS result;\n-- => [{\"result\":null}]"}
Notebook ready in readonly mode.
API reference
Exact signatures with descriptions, requirements, inputs, returns, and examples.
try_sub(UINT256, UINT256) #
Returns a - b when a >= b, otherwise NULL.
Related functions
Category and tags
- Category
- EVM utilities
- Tag
- Types
- Tag
- EVM