Skip to contents

Returns the number of bits that are set.

Usage

bit_count(x)

Arguments

x

TINYINT | SMALLINT | INTEGER | BIGINT | HUGEINT | BIT

Value

TINYINT | BIGINT

SQL examples

bit_count(31)