Skip to main content

Boolean Operations

There are two Boolean literals: TRUE and FALSE.

We support the following Boolean operations:

OR

The following truth table defines the OR operator:

TRUEFALSENULL
TRUETRUETRUETRUE
FALSETRUEFALSENULL
NULLTRUENULLNULL

AND

The following truth table defines the AND operator:

TRUEFALSENULL
TRUETRUEFALSENULL
FALSEFALSEFALSEFALSE
NULLNULLFALSENULL

NOT

The following table defines the NOT operator:

TRUEFALSE
FALSETRUE
NULLNULL

IS FALSE

The following table defines the IS FALSE operator:

TRUEFALSE
FALSETRUE
NULLFALSE

IS NOT FALSE

The following table defines the IS NOT FALSE operator:

TRUEFALSE
FALSETRUE
NULLTRUE

IS TRUE

The following table defines the IS TRUE operator:

TRUETRUE
FALSEFALSE
NULLFALSE

IS NOT TRUE

The following table defines the IS NOT TRUE operator:

TRUEFALSE
FALSETRUE
NULLTRUE

Casting a string to a Boolean applies the following algorithm:

  • whitespaces are trimmed
  • string is converted to lowercase
  • value 'true' is converted to TRUE
  • value 'false' is converted to FALSE
  • any other string produces a runtime error
info

Notice that not all Boolean operations produce NULL results when an operand is NULL.