Skip to main content
VeloDB Cloud 4.x is based on Doris 3.x. Versions in this section refer to Doris versions. See Version Mapping.

XOR

Description​

Performs a bitwise exclusive OR operation on two BOOLEAN values.

Syntax​

<lhs> XOR <rhs>

Parameters​

parameterdescription
<lhs>The first BOOLEAN value to be evaluated
<rhs>The second BOOLEAN value to be evaluated

Return Value​

Returns the exclusive OR of two BOOLEAN values.

Examples​

select true XOR false,true XOR true;
+------------------+-----------------+
| xor(TRUE, FALSE) | xor(TRUE, TRUE) |
+------------------+-----------------+
| 1 | 0 |
+------------------+-----------------+