Skip to main content

Logic Operators

Description​

Logical conditions combine the results of two components' conditions to generate a single result based on them, or to invert the result of a condition.

Operator Introduction​

OperatorFunctionExample
NOTReturns TRUE if the following condition is FALSE. Returns FALSE if TRUE. If it is UNKNOWN, it remains UNKNOWN.SELECT NOT (TRUE)
ANDReturns TRUE if both components' conditions are TRUE. Returns FALSE if either is FALSE. Otherwise, returns UNKNOWN.SELECT TRUE AND FALSE
ORReturns TRUE if either component's condition is TRUE. Returns FALSE if both are FALSE. Otherwise, returns UNKNOWN.SELECT TRUE OR NULL

Truth Tables​

NOT Truth Table​

| | TRUE | FALSE | UNKNOWN | | :---- | :------ | :------ | | NOT | FALSE | TRUE | UNKNOWN |

AND Truth Table​

ANDTRUEFALSEUNKNOWN
TRUETRUEFALSEUNKNOWN
FALSEFALSEFALSEFALSE
UNKNOWNUNKNOWNFALSEUNKNOWN

OR Truth Table​

ORTRUEFALSEUNKNOWN
TRUETRUETRUETRUE
FALSETRUEFALSEUNKNOWN
UNKNOWNTRUEUNKNOWNUNKNOWN