BIT_NOT

Purpose

This function computes the bitwise negation of a single numerical value.

Syntax

bit_not::=

Bit_Not

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).
  • If the parameter is NULL, the result is NULL.

Example

SELECT BIT_NOT(0), BIT_NOT(18446744073709551615), BIT_AND( BIT_NOT(1), 5);

Result

BIT_NOT(0) BIT_NOT(18446744073709551615) BIT_AND( BIT_NOT(1), 5)
18446744073709551615 0 4