hi ,
How can we set default values as NULL to an input parameter in a stored Procedure.
create or replace procedure emp_proc ( p_test_input in varchar2
p_emp_id in number,
p_emp_name in varchar2,
p_manager_id in number )
as
begin
if ( upper ( p_test_input ) = 'I' )
then
insert into emp
values ( p_emp_id ,p_emp_name ,p_Manager_id,sysdate );
elsif ( upper ( p_test_input ) = 'D' )
then
delete from emp
where emp_id = p_emp_id;
else
dbms_output.put_line
( 'Please input ''A'' for ADD or ''D'' Delete EMPLOYEE'
);
end if;
end;
As Shown above if i want to do only delete operation
i want to call this procedure like without passing extra parameters .
EXECUTE emp_proc('D',1010);
Edited by: Rede on May 28, 2010 12:21 PM
Edited by: Rede on May 28, 2010 12:22 PM