This chapter discussed all SQL PL elements related to flow of control. This included discussions and examples of the following:
Compound statements and scope, which can be defined as ATOMIC or NOT ATOMIC to suit your needs
Labels and the various ways in which they are used
IF and CASE conditional statements (and their various forms) for more intelligent SQL procedures
Looping statements FOR, WHILE, REPEAT, and LOOP to perform repetitive sets of SQL statements
GOTO, LEAVE, ITERATE, and RETURN transfer of control statements
COMMIT and ROLLBACK transaction control statements
With these flow of control statements at your disposal, you can write powerful and robust SQL stored procedures.