9.1. A Hello World Program

The text in this session includes screen ouput from SQL*Plus sessions. Refer to Chapter 2 for hints and use of SQL*Plus commands. The following table lists the common SQL*Plus commands used in this chapter.

SQL*Plus commandDescription
SAVE filenameSaves the SQL*Plus buffer to a file with an SQL extension
@filenameSends the file to Oracle for compile/execution. You do not need to type the “.SQL” extension.
SET SERVEROUTPUT ONSets up DBMS_OUTPUT to flush the buffer to the screen.
/Sends the SQL*Plus buffer to Oracle for compile/execution.

From SQL*Plus, type the following Hello World program. First, type the SQL*Plus command SET SERVEROUTPUT ON, then the procedure text. The last line is a forward slash—this is SQL*Plus and ...

Get Programming Oracle® Triggers and Stored Procedures, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.