You are viewing the documentation of an older version of the TiDB database (TiDB v2.1).

It is recommended that you use the latest LTS version of the TiDB database.

Bit Functions and Operators

In TiDB, the usage of bit functions and operators is similar to MySQL. See Bit Functions and Operators.

Bit functions and operators

BIT_COUNT()Return the number of bits that are set as 1
&Bitwise AND
~Bitwise inversion
|Bitwise OR
^Bitwise XOR
<<Left shift
>>Right shift
Was this page helpful?