Database Reference
In-Depth Information
LOOP
DBMS_OUTPUT.PUT_LINE(TO_CHAR(STEP));
STEP := STEP + 1;
IF STEP > 5 THEN EXIT; END IF;
END LOOP;
END;
/
Note: Note the presence of the counter (STEP := STEP + 1) in the WHILE
loop example. A FOR loop counts automatically.
24.7.2.4
The FORALL Command
The syntax for the FORALL command is shown in Figure 24.21. The
FORALL is essentially a loop, looping through and executing on the ele-
ments of a collection as opposed to a coded loop such as with a FOR loop.
24.7.3
Sequence Controls
The GOTO Statement . Allows branching from one point in a block
of code to another point where the target line is denoted by a label.
The NULL Statement . This does nothing and passes control on to
the following statement.
Figure 24.21
FORALL
Command Syntax.
24.7.3.1
The GOTO Statement
A pseudocode example of use of the GOTO statement is shown as follows.
Once again, please note that proper coding practices generally will never
require the use of GOTO statements.
BEGIN
<<labelone>>
 
Search WWH ::




Custom Search