Logical Operators

Applies to: ✅ Data Cloud SQL ✅ Tableau Hyper API

These are the logical operators for boolean values:AND, OR, NOT. SQL uses a three-valued logic system with true, false, and null, which represents “unknown”.

aba AND ba OR b
TRUETRUETRUETRUE
TRUEFALSEFALSETRUE
TRUENULLNULLTRUE
FALSEFALSEFALSEFALSE
FALSENULLFALSENULL
NULLNULLNULLNULL
aNOT a
TRUEFALSE
FALSETRUE
NULLNULL

The operators AND and OR are commutative, that is, you can switch the left and right operand without affecting the result.