SQL> CREATE OR REPLACE PROCEDURE HelloWorld1 (
2 p_user_name VARCHAR2
3 ) AS
4 BEGIN
5 dbms_output.put_line('Hello ' || p_user_name || '!');
6 END HelloWorld1;
7 /
Procedure created.
SQL> CREATE OR REPLACE PROCEDURE CallHelloWorld1 (
2 p_user VARCHAR2
3 ) AS
4 BEGIN
5 -- 调用存储过程的 存储过程
6 HelloWorld1(p_user);
7 END CallHelloWorld1;
8 /
Procedure created.
执行
SQL> set serveroutput on
SQL> exec CallHelloWorld1( 'Tom' );
Hello Tom!
PL/SQL procedure successfully completed.