ARRAY_REMOVE
Descriptionβ
Removes all specified elements from an array
Syntaxβ
ARRAY_REMOVE(<arr>, <val>)
Parametersβ
Parameter | Description |
---|---|
<arr> | Corresponding array |
<val> | Specifying Elements |
Return Valueβ
Returns the array after removing all specified elements. If the input parameter is NULL, it returns NULL
Exampleβ
SELECT ARRAY_REMOVE(['test', NULL, 'value'], 'value');
+------------------------------------------------+
| array_remove(['test', NULL, 'value'], 'value') |
+------------------------------------------------+
| ["test", null] |
+------------------------------------------------+