Skip to main content

Categories: Bitwise

BITWISE_XOR

Returns the bitwise exclusive OR (XOR) of two integer expressions. Returns the same type as the input (INT for INT, BIGINT for BIGINT). Returns NULL if any argument is NULL.

Syntax​

BITWISE_XOR(op1 NUMERIC, op2 NUMERIC) → NUMERIC​

  • op1: An INTEGER or BIGINT expression.
  • op2: An INTEGER or BIGINT expression.

Examples

BITWISE_XOR example
SELECT BITWISE_XOR(7, 4)
-- 3
BITWISE_XOR example
SELECT BITWISE_XOR(1, 2)
-- 3
BITWISE_XOR with a NULL argument
SELECT BITWISE_XOR(7, NULL)
-- null