Getting started
User guides
Administration guides
Reference guides
Resources
Updated Aug 11, 2022
Send us feedback
arrays_overlap
Returns true if the intersection of array1 and array2 is not empty.
array1
array2
arrays_overlap (array1, array2)
array1: An ARRAY.
array2: An ARRAY sharing a least common type with array1.
The result is BOOLEAN true if there is overlap.
true
If the arrays have no common non-null element, they are both non-empty, and either of them contains a null element, NULL, false otherwise.
NULL
false
> SELECT arrays_overlap(array(1, 2, 3), array(3, 4, 5)); true > SELECT arrays_overlap(array(1, 2, NULL, 3), array(NULL, 4, 5)); NULL
array_contains function
array_position function
SQL data type rules