CRITICAL SKILL 6.7

Create Stored Procedures—How and Why

PL/SQL is a very powerful language, and one of its most important features is the ability to store programs in the database and share them with others. We generally refer to these as stored objects or stored programs. There are four distinct types: procedures, functions, triggers, and packages. Up until now in this chapter, we have looked at anonymous PL/SQL blocks. Stored PL/SQL programs differ from these since they are named objects that are stored inside the database. Anonymous blocks are not stored in the database and must be loaded each time you want to run them.

We create stored programs for a number of reasons. The most important reason to create programs that are stored instead of ...

Get Oracle Database 10g: A Beginner's Guide 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.