Documentation
Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

contains any

The CONTAINS ANY and NOT CONTAINS ANY operator is used to evaluate whether a particular set includes any of the given values.

Syntax

  <set> CONTAINS ANY (<value>, <value>, ...)

  <set> NOT CONTAINS ANY (<value>, <value>, ...)

Parameters

<set>
A set of values to consider.

Returns

TRUE
If the set contains any of the values provided. This includes if any of the values provided is null and the set contains at least one null. Or FALSE in the case of the NOT CONTAINS ANY operator.
FALSE
If the set does not contain any of the given values and the set does not contain any nulls. Or TRUE in the case of the NOT CONTAINS operator.
NULL
If the set contains at least one null and does not contain any of the values provided and none of the values is null.

Examples

DATABASES CONTAINS ANY ("MY DATABASE", "OTHER DATABASE")
DATABASES CONTAINS ANY (null, "MY DATABASE")
DATABASES NOT CONTAINS ANY (null, "MY DATABASE")