Skip to main content
  • Returns TRUE if any element in the array is TRUE.
  • Returns FALSE if all elements in the array are FALSE or if the array is empty.
  • Returns NULL if any element is NULL and no element is TRUE.
When an optional lambda function is provided, ARRAY_ANY_MATCH applies the function to each element and then evaluates the resulting array. Alias: ANY_MATCH

Syntax

Parameters

Return Types

The ARRAY_ANY_MATCH function returns a result of type BOOLEAN.

Examples

Example The following code example checks if an array contains the value esimpson as the result is_he_playing. Returns FALSE because the array does not contain the specified value.

Rows: 1Execution time: 5.59ms

Example The following code example checks if each element in the first array is divisible by the corresponding element in the second array in a result labeled divisible. Returns TRUE because at least one element in the first array is divisible by its corresponding element in the second array (45 / 15).

Rows: 1Execution time: 5.95ms

Example The following code example evaluates multiple arrays using ARRAY_ANY_MATCH. Returns FALSE for the empty array, TRUE for the [TRUE] array, FALSE for the [FALSE] array, NULL for the [NULL] array, and NULL for the [FALSE, NULL] array.

Rows: 1Execution time: 5.87ms