This form of IF executes the statements within the IF and ELSE bounds when conditional_expression evaluates to TRUE. Otherwise, the statements within the ELSE and END IF bounds execute.
In the following example, only one of the specified INSERT statements executes, depending on the value for hNoAccts.
IF hNoAccts = 1 THEN INSERT INTO temp_table VALUES (hNoAccts, 'One customer'); ELSE INSERT INTO temp_table VALUES (hNoAccts, 'More than one customer'); END IF;