Executing the PL/SQL Program

PL/SQL code blocks that are contained in an external file are called anonymous block procedures and can be executed from the SQL prompt by using the START keyword. The location and name of the file follow the START keyword. This keyword causes SQL*Plus to load, compile, and execute the code block contained in the file. Listing 14.2 illustrates the execution of the code block illustrated in Listing 14.1.

Listing 14.2. Executing a PL/SQL Program
SQL> start c:\business\oracle~1\plsql1\l1.sql 

HELLO 

PL/SQL procedure successfully completed 

End listing 

Upon completion of the PL/SQL code block, Oracle will output the message “PL/SQL procedure successfully completed,” which means that the program completed execution. If ...

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.