613-518-1166 info@zimdatabases.com
Select Page

# Truth Tables

For Boolean Operators: AND, OR, XOR, NOT

For Conditional Operators: [NOT] BETWEEN, [NOT] IN, [NOT] LIKE, IS [NOT] \$NULL

## Truth Table for a Boolean AND Expression

expression1 AND expression2

If the conditional expressions linked by AND are

• both TRUE, then the Boolean expression is TRUE.

• both FALSE, then the Boolean expression is FALSE.

• one TRUE and one FALSE, then the Boolean expression is FALSE.

## Truth Table for a Boolean OR Expression

expression1 OR expression2

If the conditional expressions linked by OR are

• both TRUE, then the Boolean expression is TRUE.

• both FALSE, then the Boolean expression is FALSE.

• one TRUE and one FALSE, then the Boolean expression is TRUE.

## Truth Table for a Boolean X OR Expression

expression1 XOR expression2

If the conditional expressions linked by XOR are

• both TRUE, then the Boolean expression is FALSE.

• both FALSE, then the Boolean expression is FALSE.

• one TRUE and one FALSE, then the Boolean expression is TRUE.

## Truth Table for a Boolean NOT Expression

NOT expression1

If the conditional expression preceded by NOT is

• TRUE, then the Boolean expression is FALSE.

• FALSE, then the Boolean expression is TRUE.

## Truth Table for a [NOT] BETWEEN Expression

expression1 [NOT] BETWEEN expression2 AND expression3

A BETWEEN comparison is TRUE when

• expression1 is equal to or greater than expression2 and equal to or less than expression3

A NOT BETWEEN comparison is TRUE when

• expression1 is less than expression2

• expression1 is greater than expression3

The [NOT] BETWEEN comparison is FALSE in all other circumstances.

## Truth Table for a [NOT] IN Expression

expression1 [NOT] IN (expression2 [Â«,expression3 Â»])

An IN comparison is TRUE when

• expression1 is equal to one or more of the expressions listed in parentheses

A NOT IN comparison is TRUE when

• expression1 is not equal to any of the expressions listed in parentheses

The [NOT] IN expression is FALSE in all other circumstances.

Note: Comparison ends as soon as a TRUE instance is found.

## Truth Table for a [NOT] LIKE Expression

expression [NOT] LIKE pattern

A LIKE comparison is TRUE when

• expression matches pattern.

A NOT LIKE comparison is TRUE when

• expression does not match pattern

The [NOT] LIKE expression is FALSE in all other circumstances.

## Truth Table for an IS [NOT] \$NULL Expression

expression IS [NOT] [\$]NULL

An IS \$NULL comparison is TRUE when

• expression evaluates to \$Null

An IS NOT \$NULL comparison is TRUE when

• expression does not evaluate to \$Null

The IS [NOT] \$NULL expression is FALSE in all other circumstances.