The programming statements in SPL that make it a full procedural complement to SQL are described in this section.3.5.1 IF StatementIF statements let you execute commands based on certain conditions. SPL has four forms of IF:22.214.171.124 IF-THENIF-THEN statements are the simplest form of IF. The statements between THEN and END IF will be executed if the condition is true. Otherwise, they are skipped.In the following example an IF-THEN statement is used to test and display employees who have a commission.126.96.36.199 IF-THEN-ELSEIF-THEN-ELSE statements add to IF-THEN by letting you specify an alternative set of statements that should be executed if the condition evaluates to false.The previous example is modified so an IF-THEN-ELSE statement is used to display the text Non-commission if the employee does not get a commission.188.8.131.52 IF-THEN-ELSE IFIF statements can be nested so that alternative IF statements can be invoked once it is determined whether or not the conditional of an outer IF statement is true or false.In the following example the outer IF-THEN-ELSE statement tests whether or not an employee has a commission. The inner IF-THEN-ELSE statements then test whether the employee’s total compensation exceeds or is less than the company average.Note: The logic in this program can be simplified considerably by calculating the employee’s yearly compensation using the NVL function within the SELECT command of the cursor declaration, however, the purpose of this example is to demonstrate how IF statements can be used.When you use this form, you are actually nesting an IF statement inside the ELSE part of an outer IF statement. Thus you need one END IF statement for each nested IF and one for the parent IF-ELSE.184.108.40.206 IF-THEN-ELSIF-ELSE[ ELSIF boolean-expression THEN[ ELSIF boolean-expression THENIF-THEN-ELSIF-ELSE provides a method of checking many alternatives in one statement. Formally it is equivalent to nested IF-THEN-ELSE-IF-THEN commands, but only one END IF is needed.The following example uses an IF-THEN-ELSIF-ELSE statement to count the number of employees by compensation ranges of $25,000.