Returns the bitwise XOR of two INT values.
Note BITXOR is supported only in Realtime Compute for Apache Flink that uses Ververica Runtime (VVR) 3.0.0 or later.
Syntax
INT BITXOR(INT number1, INT number2)Parameters
| Parameter | Data type |
|---|---|
| number1 | INT |
| number2 | INT |
Usage notes
Both parameters must be of the INT type. The return value is also INT.
Examples
The following examples demonstrate BITXOR behavior across common cases.
Test data:
| a (INT) | b (INT) |
|---|---|
| 2 | 3 |
Test statement:
SELECT BITXOR(a, b) AS result
FROM T1;Test results:
| result (INT) | Notes |
|---|---|
| 1 | 2 is 10 in binary, 3 is 11 in binary — XOR gives 01 (1) |