August 2002
Intermediate to advanced
528 pages
10h 12m
English
PL/SQL programs can be written and executed from the SQL prompt in SQL*Plus. Due to the complexity of the programs, this is not the preferable mechanism. It is best to develop the program in an external text editor such as Notepad or in Oracle’s Procedure Builder. The program files can then be called from SQL*Plus and be executed.
Our first program will output the message Hello. This program is contained in Listing 14.1.
SQL> set serveroutput on
SQL> begin
2 dbms_output.put_line ('Hello');
3 end;
4 /
Hello
PL/SQL procedure successfully completed.
SQL>
End listing
|
This program consists of a PL/SQL code block that contains a command. The DBMS_OUTPUT.PUT_LINE ...