Tutorials
Oracle 9i
Tutorial 9 : Oracle 9i: PL/SQL Control Structures
Tutorial 9 : Oracle 9i: PL/SQL Control Structures - Page 2

WHILE-LOOP
This is similar to LOOP. A condition placed between WHILE and LOOP is evaluated before each iteration. If the condition evaluates to TRUE the statements are executed and the control resumes at the top of the LOOP. If the condition evaluates to FALSE or NULL then control comes out of the loop.

FOR – LOOP:
The FOR – LOOP is used to repeatedly execute a set of statements for certain number of times specified by a starting number and an ending number. The variable value starts at the starting value given and increments by 1(default and can not be changed) with each iteration. The iteration stops when the variable value reaches end value specified.
Syntax:
FOR
LOOP
Statements
END LOOP;



Sequential Control Statements
The GOTO statement is used for doing unconditional branching to a named label. Its frequent usage is not recommended. We should have at least one executable statement following the label. GOTO statements can some time result in complex, unstructured code making it difficult to understand.
First Page: Tutorial 9 : Oracle 9i: PL/SQL Control Structures
|
I have completed working with control structures thoroughly.... |
| Can i have sub-loops in PL/SQL? like a loop inside a LOOP?? |
|
this is best tutorial...in real best..........its great |