PL/SQL, short for Procedural Language extension to SQL, complements SQL with a procedural programming language. PL/SQL is a feature of the Oracle database.
The objective of this chapter is to introduce some of the most commonly used PL/SQL features such as
▪ row-by-row processing of query output
▪ if-then-else decision logic
▪ exception handling
▪ user-defined functions
You learned in the previous chapters that the output of a query can be more than one row. You can write a PL/SQL program to process query output row-by-row sequentially.
The structure of the PL/SQL program for row-by-row processing is as follows.
FOR output_row_variable IN (
row processing statements; ...