SQL control statements
Control statements are SQL statements that allow SQL to be used as 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.
Control statements are supported in SQL procedures, SQL functions, SQL triggers, and compound (dynamic) statements.