OVERLOADING

2016-12-03 Md. Al amin
Package Create
 create or replace package test01_pkg is
procedure insert_rec(emp_id number, emp_name varchar2,
salary number, mgr number);
procedure insert_rec(emp_id number, emp_name varchar2);
procedure insert_rec(emp_name varchar2,emp_id number );
end ;
Package Body
create or replace package body test01_pkg is
procedure insert_rec(emp_id number, emp_name varchar2,
salary number, mgr number)
is
begin
insert into emp_11
values(emp_id, emp_name , salary, mgr) ;
commit ;
end ;
procedure insert_rec(emp_id number, emp_name varchar2)
is
begin
update emp_11
set id=emp_id, name=emp_name
commit;
end ;
procedure insert_rec(emp_name  varchar2,emp_id number )
is
begin
delete emp_11
where name=emp_name and id=emp_id;
commit;
end ;
end;