Overloaded local procedures: number and varchar2
SQL>
SQL> DECLARE
2
3 PROCEDURE LocalProc(p1 IN NUMBER) IS
4 BEGIN
5 DBMS_OUTPUT.PUT_LINE('In version 1, p1 = ' ||p1);
6 END LocalProc;
7
8 PROCEDURE LocalProc(p1 IN VARCHAR2) IS
9 BEGIN
10 DBMS_OUTPUT.PUT_LINE('In version 2, p1 = ' ||p1);
11 END LocalProc;
12 BEGIN
13
14 LocalProc(12345);
15
16
17 LocalProc('abcdef');
18 END;
19 /
In version 1, p1 = 12345
In version 2, p1 = abcdef
PL/SQL procedure successfully completed.
SQL>
Related examples in the same category