BOOLOR
functionsupportedCore SQL functionsComputes the Boolean OR of two numeric expressions. 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 both expressions are non-zero or one expression is non-zero and the other expression is zero or NULL. - False if both expressions are zero. - NULL if both expressions are NULL or one expression is NULL and the other expression is zero.
Syntax
BOOLOR( <expr1> , <expr2> )
Parameters
| Name | Required | Description |
|---|---|---|
expr1 | required | A numeric expression. |
expr2 | 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 when it rounds non-zero floating-point numbers to zero.
- For examples of this behavior and workarounds, see Compute Boolean OR results for floating-point numbers.