Categories: Bitwise
XOR
Returns the bitwise exclusive OR (XOR) of two INTEGER values. Only supports INTEGER inputs (use BITWISE_XOR for BIGINT). Returns NULL if any argument is NULL.
Syntax
XOR(expression1 int32, expression2 int32) → int32
- expression1: The integer input.
- expression2: The integer input.
Examples
XOR exampleSELECT XOR(1, 1)
-- 0
SELECT XOR(7, 4)
-- 3
SELECT XOR(NULL, 1)
-- null