Array functions
ARRAY_CONTAINS
Reference material for ARRAY_CONTAINS function
Returns true
if a specified argument is present in the array, or false
otherwise. Note that ARRAY_CONTAINS
employs IS NOT DISTINCT FROM
semantics when comparing values, i.e. NULL
is considered equal to NULL
.
Alias: CONTAINS
Syntax
Parameters
Parameter | Description | Supported input types |
---|---|---|
<array> | The array to be checked for the given element. | ARRAY |
<value> | The element to be searched for within the array | Any type that can be converted to the element type of the array |
Return Type
The BOOLEAN
value true
if the element to be searched is present in the array, or false
otherwise.
Example
Returns: true
, since 'danielle53'
is an element of the input array.
Returns: false
, since 'danielle53'
is not an element of the input array.
Returns: true
, since NULL
is an element of the input array.