Eg:
create or replace procedure salaryAdd(
p_author_code in auths.author_code%type,
p_addSalary in auths.salary%type
) as
v_currentSalary auths.salary%type;
v_maxSalary auths.salary%type default 1000;
begin
update auths set salary=salary+p_addSalary where author_code=p_author_code
returning salary into v_currentSalary;
if sql%notfound then
raise_application_error(-20001,'没有代码为'||p_author_code||'的作家存在');
end if;
commit;
end;
/