Forward Referencing : Procedure « Function Procedure Packages « Oracle PL/SQL Tutorial






SQL>
SQL> DECLARE
  2    PROCEDURE b (caller VARCHAR2);  -- This is a forward referencing stub.
  3    PROCEDURE a (caller VARCHAR2) IS
  4      procedure_name VARCHAR2(1) := 'A';
  5    BEGIN
  6      dbms_output.put_line('Procedure "A" called by ['||caller||']');
  7      b(procedure_name);
  8    END;
  9    PROCEDURE b (caller VARCHAR2) IS
 10      procedure_name VARCHAR2(1) := 'B';
 11    BEGIN
 12      dbms_output.put_line('Procedure "B" called by ['||caller||']');
 13    END;
 14  BEGIN
 15    a('Main');
 16  END;
 17  /
Procedure "A" called by [Main]
Procedure "B" called by [A]

PL/SQL procedure successfully completed.

SQL>








27.5.Procedure
27.5.1.Procedures
27.5.2.A procedure block.
27.5.3.Wrapping a task into a procedure
27.5.4.Storing PL/SQL procedure in the Database
27.5.5.Creating stored procedures
27.5.6.Execute a procedure
27.5.7.Demonstration of a nested procedure block
27.5.8.Create or replace a procedure
27.5.9.Calling a Procedure
27.5.10.Pass ROWTYPE to a procedure
27.5.11.Insert debug line to the stored procedure with DBMS_OUTPUT.PUT_LINE
27.5.12.Listing Stored Procedure Information
27.5.13.Decrease salary with user procedure
27.5.14.Forward Referencing