ARRAY_POSITION

functionsupportedCore SQL functions

docs.snowflake.com ↗

Semi-structured and structured data functions

Returns the index of the first occurrence of an element in an array.

Syntax

ARRAY_POSITION( <value_expr> , <array> )

Parameters

NameRequiredDescription
value_exprrequiredValue to find in array. If array is a semi-structured ARRAY, value_expr must evaluate to a VARIANT. If array is a structured ARRAY, value_expr must evaluate to a type that is comparable to the type of the ARRAY.
arrayrequiredThe ARRAY to search.

Returns

The function returns an INTEGER specifying the position of value_expr in array.

Usage notes