About SQL control statements
SQL control statements, also called SQL Procedural Language (SQL PL), are SQL statements that allow SQL to be used in a manner similar to writing a program in a structured programming language.
SQL control statements provide the capability to control the logic flow, declare, and set variables, and handle warnings and exceptions. Some SQL control statements include other nested SQL statements. SQL control statements can be used in the body of a routine, trigger or a compound statement.