BIT_XOR

Aggregate Function. Perform an XOR function on corresponding pairs of bits (i.e., the first pair of bits, the second pair of bits, etc.)

Syntax

BIT_XOR  (<expr1>, <expr2>)

Arguments

  • expression: expressions must be integer data types.

Return Type

This will result is a one if two of the corresponding bits are different.  If the bits are the same it will return a zero.

Examples

SELECT group_name, BIT_XOR(001) FROM numeric_sample GROUP BY group_name;
+-------------------------+
|group_name | BIT_AND(001)|
+-------------------------+
|epsilon    | 1           |
+-----------|-------------+
|gamma      | 0           |
+-----------|-------------+
|sigma      | 0           |
+-----------|-------------+