Loading...
Count the set bits. This function returns the number of bits that are set to 1 in the binary representation of a number.
BIT_COUNT(N)
Returns the number of bits that are set in the argument N.
This page is licensed: GPLv2, originally from
SELECT BIT_COUNT(29), BIT_COUNT(b'101010'); +---------------+----------------------+ | BIT_COUNT(29) | BIT_COUNT(b'101010') | +---------------+----------------------+ | 4 | 3 | +---------------+----------------------+