Named Procedures

The code blocks that have been illustrated thus far have been anonymous procedures that may be executed from only an external file. This requires Oracle to search the hard drive for the file, load it into memory, compile the state-ments, and execute the procedure. Code blocks may also be defined as database objects, meaning that the code block resides within the database in a compiled form; therefore, performance will be greater using these types of procedures.

There are two types of database code blocks: named procedures and functions. The difference between the two is that the named procedure can be executed as a statement of its own, and a function is always used as an argument within a statement. Another difference is that ...

Get Oracle SQL and PL/SQL Handbook: A Guide for Data Administrators, Developers, and Business Analysts 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.