René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback
 

Overloading in PL/SQL

set feedback off
create or replace package ol as
  procedure f (p number);
  procedure f (p varchar2);
end;
/


create or replace package body ol as
  procedure f (p number) is
  begin
    dbms_output.put_line('f <number>  called');
  end;

  procedure f (p varchar2) is
  begin
    dbms_output.put_line('f <varchar> called');
  end;
end;
/


set serveroutput on

exec ol.f(42);
exec ol.f('twenty four');

drop package ol;