5 PL/SQL Control Statements
PL/SQL has three categories of control statements: conditional selection statements, loop statements and sequential control statements.
PL/SQL categories of control statements are:
-
Conditional selection statements, which run different statements for different data values.
The conditional selection statements are
IF
andCASE
. -
Loop statements, which run the same statements with a series of different data values.
The loop statements are the basic
LOOP
,FOR
LOOP
, andWHILE
LOOP
.The
EXIT
statement transfers control to the end of a loop. TheCONTINUE
statement exits the current iteration of a loop and transfers control to the next iteration. BothEXIT
andCONTINUE
have an optionalWHEN
clause, where you can specify a condition. -
Sequential control statements, which are not crucial to PL/SQL programming.
The sequential control statements are
GOTO
, which goes to a specified statement, andNULL
, which does nothing.