10.2. IS [NOT]{TRUE | FALSE | UNKNOWN} Predicate
This predicate tests a condition that has the truth-value TRUE, FALSE, or UNKNOWN, and returns TRUE or FALSE. The syntax is:
<Boolean test> ::= <Boolean primary> [IS [NOT] <truth value>] <truth value> ::= TRUE | FALSE | UNKNOWN <Boolean primary> ::= <predicate> | <left paren> <search condition> <right paren>
As you would expect, the expression IS NOT <logical value> is the same as NOT (IS <logical value>), so the predicate can be defined as shown in Table 10.2.
Table 10.2. Defining the Predicate: True, False, or Unknown
IS condition | TRUE FALSE UNKNOWN ======================================= TRUE | TRUE FALSE FALSE FALSE | FALSE TRUE FALSE UNKNOWN | FALSE FALSE TRUE |
If you are familiar with ...
Get Joe Celko's SQL for Smarties, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.