Computes the Boolean XOR of two numeric expressions (i.e. one of the expressions, but not both expressions, is TRUE). 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 one expression is non-zero and the other expression is zero.
False
if both expressions are non-zero or both expressions are zero.
NULL
if one or both expressions are NULL.
SELECT BOOLXOR(2, 0), BOOLXOR(1, -1), BOOLXOR(0, 0), BOOLXOR(NULL, 3), BOOLXOR(NULL, 0), BOOLXOR(NULL, NULL); +---------------+----------------+---------------+------------------+------------------+---------------------+ | BOOLXOR(2, 0) | BOOLXOR(1, -1) | BOOLXOR(0, 0) | BOOLXOR(NULL, 3) | BOOLXOR(NULL, 0) | BOOLXOR(NULL, NULL) | |---------------+----------------+---------------+------------------+------------------+---------------------| | True | False | False | NULL | NULL | NULL | +---------------+----------------+---------------+------------------+------------------+---------------------+
Copy
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4