Overloaded local procedures. : Overload « Stored Procedure Function « Oracle PL / SQL






Overloaded local procedures.

 
SQL>
SQL> set serveroutput on
SQL>
SQL> DECLARE
  2    PROCEDURE LocalProc(p_Parameter1 IN NUMBER) IS
  3    BEGIN
  4      DBMS_OUTPUT.PUT_LINE('In version 1, p_Parameter1 = ' ||
  5                           p_Parameter1);
  6    END LocalProc;
  7
  8    PROCEDURE LocalProc(p_Parameter1 IN VARCHAR2) IS
  9    BEGIN
 10      DBMS_OUTPUT.PUT_LINE('In version 2, p_Parameter1 = ' ||
 11                           p_Parameter1);
 12    END LocalProc;
 13  BEGIN
 14    LocalProc(12345);
 15
 16    LocalProc('abcdef');
 17  END;
 18  /
In version 1, p_Parameter1 = 12345
In version 2, p_Parameter1 = abcdef

PL/SQL procedure successfully completed.

SQL>
SQL>

 








Related examples in the same category

1.Use RESTRICT_REFERENCES with overloaded subprograms.