This is an old revision of the document!
PROCEDURE upsert_salary
( p_first_name IN VARCHAR2,
p_last_name IN VARCHAR2,
p_salary IN number)
IS
BEGIN
begin
insert into emp (first_name, last_name, salary)
values (p_first_name, p_last_name, p_salary);
exception
when DUP_VAL_ON_INDEX then
update emp set salary = p_salary where
first_name = p_first_name and
last_name = p_last_name;
when others then
dbms_output.put_line('Fehler '||SQLERRM);
end;
begin
null;
end;
END; -- Procedure