December 2010
Intermediate to advanced
451 pages
11h 16m
English
You have two conditions that are mutually exclusive. You want to execute one set of statements if the first condition evaluates to TRUE. Otherwise, if the first condition is FALSE or NULL, then execute a different set of statements.
Use an IF-ELSE statement to evaluate the condition and execute the statements that correspond to it if the condition evaluates to TRUE. In the following example, a given employee ID is used to query the EMPLOYEES table. If that employee exists, then the employee record will be retrieved. If not found, then a message will be displayed stating that no match was found.
DECLARE
employee employees%ROWTYPE; emp_count ...Read now
Unlock full access