Chapter 9. PL/SQL

PL/SQL, which stands for Procedural Language extensions to the Structured Query Language, is a highly structured, readable, and accessible language that is tightly integrated with the Oracle database. PL/SQL was the first procedural language supported by the Oracle database, and it continues to be the most popular language for creating program units, such as procedures, functions, packages, and triggers, in the database.

This chapter briefly summarizes PL/SQL fundamentals and syntax. To the extent possible, we’ve organized descriptions of PL/SQL statements in accordance with the block structure of PL/SQL code. (PL/SQL programs are generally organized into four sections: the header section, declaration section, execution section, and exception section.) So, for example, within the discussion under the “Execution Section” heading, you will find descriptions of the syntax and entities you will work with in that section. If a particular type of data, such as a cursor, must be declared before it can be used, you will find declarative information under the “Declaration Section” heading and information on its use under the “Execution Section” heading. Certain topics, such as packages, triggers, and external procedures are described under separate heads toward the end of the chapter.

There is much more to learn about this powerful language. For an excellent discussion of the language syntax and use, see Oracle PL/SQL Programming by Steven Feuerstein with Bill Pribyl (O’Reilly ...

Get Oracle in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.