BIT_XOR

Purpose

This function computes the bitwise exclusive OR operation of two numerical values. The result in each position is , if the two corresponding bits are different.

Syntax

bit_xor::=

Bit_Xor

Usage Notes

  • Bit functions are limited to 64 bits, which is positive numbers between 0 and 18446744073709551615.
  • The result data type is DECIMAL(20,0).

Example

-- 1001 XOR 0011 = 1010
SELECT BIT_XOR(9,3);