PL/SQL User's Guide and Reference

Contents Index Home Previous Next

Overview

According to the structure theorem, any computer program can be written using the basic control structures shown in Figure 3 - 1. They can be combined in any way necessary to deal with a given problem.

Figure 3 - 1. Control Structures

The selection structure tests a condition, then executes one sequence of statements instead of another, depending on whether the condition is true or false. A condition is any variable or expression that returns a Boolean value (TRUE, FALSE, or NULL). The iteration structure executes a sequence of statements repeatedly as long as a condition holds true. The sequence structure simply executes a sequence of statements in the order in which they occur.


Contents Index Home Previous Next