Basic Oracle Concepts and Programming Question:
How To Call a Sub Procedure?
Answer:
To call a sub procedure, just use the sub procedure name as a statement. Here is another example of calling a sub procedure:
SQL> CREATE OR REPLACE PROCEDURE WELCOME AS
2 PROCEDURE WELCOME_PRINT(S CHAR) AS
3 BEGIN
4 DBMS_OUTPUT.PUT_LINE('Welcome to ' || S);
5 END;
6 BEGIN
7 WELCOME_PRINT('globalguideline');
8 END;
9 /
SQL> EXECUTE WELCOME;
Welcome to globalguideline
SQL> CREATE OR REPLACE PROCEDURE WELCOME AS
2 PROCEDURE WELCOME_PRINT(S CHAR) AS
3 BEGIN
4 DBMS_OUTPUT.PUT_LINE('Welcome to ' || S);
5 END;
6 BEGIN
7 WELCOME_PRINT('globalguideline');
8 END;
9 /
SQL> EXECUTE WELCOME;
Welcome to globalguideline
Previous Question | Next Question |
How To Define an Oracle Sub Procedure? | How To Define a Sub Function? |