Lists & arrays
Scalar
array_indexof()
Returns the index of the element if the list contains the element. If the element is not found, it returns NULL.
Reference: DuckDB 1.3.2
Alias of list_position()
Arguments & returns
array_indexof(list, element)
Scalar
| Overload link | list | element |
Returns |
|---|---|---|---|
| #01 | ANY[] | ANY |
INTEGER |
Example
Haybarn WASM 2.0.0-rc12 · In your browser
Engine example · Run to view results.
Catalog examples
SELECT
list_position([1, 2, NULL], 2);