To be effective, a code block or procedure needs to have commands that allow the developer to document the logic necessary to determine the behavior. Oracle uses conditional logic statements to form the procedure’s behavior. The logic statements come in two forms:
IF-THEN-ELSE structures ELSIF statements
The most common conditional logic device is the IF-THEN-ELSE structure. This is a very powerful device that allows developers to create the most intricate logic. The structure contains required keywords (IF-THEN-END IF) and one optional (ELSE) keyword. The basic structure is as follows:
If (conditional expression) then Statements; Else Statements; End if;
The structure begins ...