A newer version of this documentation is available.

View Latest

Logical operators

Logical terms let you combine other expressions using Boolean logic. N1QL provides the following logical operators:

  • AND

  • OR

  • NOT

AND

condition AND condition

AND evaluates to TRUE only if both conditions are TRUE.

OR

condition OR condition

OR evaluates to TRUE if one of the conditions is TRUE.

NOT

NOT condition

NOT evaluates to TRUE if the expression does not match the condition.