BIT_AND

Purpose

This function computes the bitwise AND operation of two numerical values.

Syntax

bit_and::=

Bit_And

Usage Notes

  • Bit functions are limited to 64 bits, which means, positive numbers between 0 and 18446744073709551615.
  • The result data type is DECIMAL(20,0).
  • If one of the parameters is NULL, the result is NULL.

Example

-- 1001 AND 0011 = 0001
SELECT BIT_AND(9,3);