ARRAY_REMOVE
functionsupportedCore SQL functionsGiven 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
| Name | Required | Description |
|---|---|---|
array | required | The source array. |
value_of_elements_to_remove | required | The 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
- If all of the elements in array are equal to value_of_elements_to_remove, the function returns an empty ARRAY.