Database Reference
In-Depth Information
Figure 24.12
Using a REF
Cursor.
EXEC GETROWS('England');
SET SERVEROUTPUT OFF;
24.7
Control Structures
Any program can be coded using basic control structures. PL/SQL contains
all of the necessary requirements. Basic control structures include these ele-
ments: selection, iteration, and sequence controls. Control structures allow
for modular programming. This makes it easier to share code with other
programmers or to divide a larger, more complex program into smaller,
more easily understood components. In PL/SQL, the control structures are
as follows:
Selection . IF and CASE statements.
Iteration or Repetition . Multiple types of loops, sometimes includ-
ing completion conditions, such as a WHILE loop.
Sequence Controls . GOTO and NULL. A GOTO statement jumps
from any point in a block of code to another. The NULL command
simply does nothing at all and can be used as a placeholder.
 
Search WWH ::




Custom Search