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

contains

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

Syntax

  <set> CONTAINS <value>
      
  <set> NOT CONTAINS <value>

Parameters

<set>
A set of values to consider.

Returns

TRUE
If the set contains the provided value. This includes if the value provided is null and the set contains at least one null. Or (FALSE in the case of the NOT CONTAINS operator)
FALSE
If the set does not contain the value 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 the value provided (and the value is not null).

Examples

DATABASES CONTAINS "MY DATABASE"
DATABASES CONTAINS null
DATABASES NOT CONTAINS null