- Categories:
Semi-structured and structured data functions (Array/Object)
ARRAYS_OVERLAP¶
Compares whether two arrays have at least one element in common. Returns TRUE if there is at least one element in common; otherwise returns FALSE. The function is NULL-safe, meaning it treats NULLs as known values for comparing equality.
- See also:
Syntax¶
Usage notes¶
When you compare objects, the objects must be identical to return TRUE. For details, see Examples (in this topic).
Both arguments must either be structured ARRAYs or semi-structured ARRAYs.
If you are passing in structured ARRAYs, the ARRAY in the second argument must be comparable to the ARRAY in the first argument.
Examples¶
Here are some examples:
The following example shows that NULL values are considered equal to other NULL values. If each array contains a NULL value, then the arrays overlap, even if no other (non-NULL) values overlap: