O'Reilly logo

Oracle PL/SQL Best Practices by Steven Feuerstein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Program Construction

There are three kinds of programs (also known as modules) in PL/SQL:

Procedure

A procedure is a program that executes one or more statements. It’s called as a standalone statement.

Function

A function is a program that executes one or more statements and returns a value. It’s called within an expression (assignment statement, conditional expression, etc.).

Trigger

A trigger is a program whose execution is “triggered” by some event, usually a SQL operation on a table or column within a table.

All of these are named, executable code units. A package, as described in Chapter 8, is a container for procedures and/or functions, as well as data. Packages, therefore, aren’t executable objects themselves.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required