Home > Articles > Data > DB2

  • Print
  • + Share This
This chapter is from the book

3.6 Chapter Summary

This chapter discussed all SQL PL elements related to flow of control. It included discussions and examples of:

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, and

GOTO, LEAVE, ITERATE and RETURN transfer of control statements.

With these flow of control statements at your disposal, you can write powerful and robust SQL stored procedures.

  • + Share This
  • 🔖 Save To Your Account