ARRAY_REMOVE

functionsupportedCore SQL functions

docs.snowflake.com ↗

Semi-structured and structured data functions

Given a source ARRAY, returns an ARRAY with elements of the specified value removed. For example, ARRAY_REMOVE([2, 5, 7, 5, 1], 5) returns an ARRAY with the elements equal to 5 removed ([2, 7, 1]).

Syntax

ARRAY_REMOVE( <array> , <value_of_elements_to_remove> )

Parameters

NameRequiredDescription
arrayrequiredThe source array.
value_of_elements_to_removerequiredThe VARIANT value of the elements to be removed. The function removes elements equal to this value. If you specify a VARCHAR value, you must first cast the value to VARIANT.

Returns

An ARRAY with all elements equal to the specified value removed. If value_of_elements_to_remove is NULL, the function returns NULL.

Usage notes