list_element()

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

Alias of list_extract()

Arguments & returns

2 overloads

list_element(list, index)

Scalar
Overload link listindex Returns
#01 ANY[]BIGINT ANY
#02 VARCHARBIGINT VARCHAR

Example

list_element example
SQL
Haybarn WASM 1.5.5-rc3 · In your browser

Engine example · Run to view results.

Catalog examples

SELECT
  list_extract([4, 5, 6], 3);