ARRAY_REMOVE_AT

functionsupportedCore SQL functions

docs.snowflake.com ↗

Semi-structured and structured data functions

Given a source ARRAY, returns an ARRAY with the element at the specified position removed. For example, ARRAY_REMOVE_AT([2, 5, 7], 0) returns an ARRAY with the element at position 0 removed ([5, 7]).

Syntax

ARRAY_REMOVE_AT( <array> , <position> )

Parameters

NameRequiredDescription
arrayrequiredThe source array.
positionrequiredThe (zero-based) position of the element to be removed. The function removes the element at this position. A negative position is interpreted as an index from the back of the array (e.g. -1 removes the last element in the array).

Returns

An ARRAY with the element at the specified position removed. If position is NULL, the function returns NULL.

Usage notes