Chapter 8Creating Procedures, Functions, and Packages

As we saw in Chapter 3, there are two main kinds of PL/SQL blocks: anonymous and named. An anonymous block (beginning with either DECLARE or BEGIN) is compiled each time it is issued. It also is not stored in the database and cannot be called directly from other PL/SQL blocks. The constructs that we will look at in this and the next two chapters—procedures, functions, packages, and triggers—are all named blocks and thus do not have these restrictions. They can be stored in the database and run when appropriate. In this chapter, we will explore the syntax of creating procedures, functions, and packages. In Chapter 9, we will examine how to use them and some of their implications. Chapter 10 ...

Get Oracle Database 10g PL/SQL Programming 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.