Transfer of control statements are used to redirect the flow of
control within an SQL procedure. This unconditional branching can
be used to cause the flow of control to jump from one point to another
point, which can either precede or follow the transfer of control
statement. The supported transfer of control statements in SQL procedures
are:
- GOTO
- ITERATE
- LEAVE
- RETURN
Transfer of control statements can be used anywhere within an SQL
procedure, however ITERATE and LEAVE are generally used in conjunction
with a LOOP statement or other looping statements.