get_bit()

Extracts the nth bit from bitstring; the first (leftmost) bit is indexed 0

Reference: DuckDB 2.0.0

Arguments & returns

get_bit(bitstring, index)

Scalar
Overload link bitstringindex Returns
#01 BITINTEGER INTEGER

Example

get_bit example
SQL
Haybarn WASM 2.0.0-rc12 · In your browser

Engine example · Run to view results.