Procedural Constructs
Compound Statements
Refers to a set of SQL statements written between begin and end.
Loops
while
repeat
for
Permits iteration over all results of a query.
For example:
leave is used to exit the loop
iterate starts from the next tuple
Conditional Constructs
SQL also supports conditional constructs such as if-then-else and case.
Exception Handling
Example:
exit is the handler; it causes the block enclosed by begin..end to be exited.
Last updated