set_bit()

Sets the nth bit in bitstring to newvalue; the first (leftmost) bit is indexed 0. Returns a new bitstring

Reference: DuckDB 2.0.0

Arguments & returns

set_bit(bitstring, index, new_value)

Scalar
Overload link bitstringindexnew_value Returns
#01 BITINTEGERINTEGER BIT

Example

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

Engine example · Run to view results.