Conditions in an IF Statement
Just as in the WHILE statement, if any expression in the condition evaluates
to NULL, then the condition cannot be true, unless you are explicitly
testing for NULL using the IS NULL operator. The following rules summarize
NULL values in conditions:
- If the expression x evaluates to NULL, then x is not true by definition. Furthermore, NOT (x) is also not true .
- IS NULL is the only operator that can return true for x. That is, x IS NULL is true, and x IS NOT NULL is not true.
If an expression in the condition has an UNKNOWN value from an uninitialized SPL variable, the statement terminates and raises an exception.
You can specify a trigger-type Boolean operator (DELETING, INSERTING, SELECTING, or UPDATING) as a condition in an IF statement only within a trigger routine.
IF Statement List
(explicit id ifsl002)
ifsl002
(explicit id ifsl003)
ifsl003
(explicit id ifsl004)
ifsl004
IF Statement List
{ BEGIN <Statement Block>[] END | <Subset of SPL Statements> [] | <Subset of SQL Statements>[] ; }
1 See Statement Block