Get started
Load & manage data
Work with data
Administration
Reference & resources
CLUSTER BY
mask
ROW FILTER
Updated Dec 03, 2024
Send us feedback
array_except
Applies to: Databricks SQL Databricks Runtime
Returns an array of the elements in array1 but not in array2.
array1
array2
array_except(array1, array2)
array1: An ARRAY of any type with comparable elements.
array2: An ARRAY of elements sharing a least common type with the elements of array1.
An ARRAY of matching type to array1 with no duplicates.
> SELECT array_except(array(1, 2, 2, 3), array(1, 1, 3, 5)); [2]
array_append function
array_compact function
array_distinct function
array_intersect function
array_sort function
array_remove function
array_union function
SQL data type rules