BOOLNOT
functionsupportedCore SQL functionsComputes the Boolean NOT of a single numeric expression. In accordance with Boolean semantics: - Non-zero values, including negative numbers, are regarded as true. - Zero values are regarded as false. As a result, the function returns: - True if the expression is zero. - False if the expression is non-zero. - NULL if the expression is NULL.
Syntax
BOOLNOT( <expr> )
Parameters
| Name | Required | Description |
|---|---|---|
expr | required | A numeric expression. |
Returns
This function returns a value of type BOOLEAN or NULL.
Usage notes
- This function rounds floating-point numbers. Therefore, it might return unexpected results for floating-point numbers that round to zero.
- For examples of this behavior and workarounds, see Compute Boolean NOT results for floating-point numbers.