list_element()

Extract the indexth (1-based) value from the list.

Reference: DuckDB 2.0.0

Alias of list_extract()

Arguments & returns

2 overloads

list_element(list, index)

Scalar
Overload link listindex Returns
#01 T[]BIGINT T

list_element(string, index)

Scalar
Overload link stringindex Returns
#02 VARCHARBIGINT VARCHAR

Example

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

Engine example · Run to view results.