create or replace procedure addsal(pno in emp.empno%type) as
prec emp%rowtype;
begin
select * into prec from emp t where t.empno = pno;
update emp t set t.sal = t.sal + 100 where t.empno = pno;
;
dbms_output.put_line('涨工资前是:' || prec.sal || '涨工资后是:' ||
(prec.sal + 100));
end;
prec emp%rowtype;
begin
select * into prec from emp t where t.empno = pno;
update emp t set t.sal = t.sal + 100 where t.empno = pno;
;
dbms_output.put_line('涨工资前是:' || prec.sal || '涨工资后是:' ||
(prec.sal + 100));
end;
addsal(7369);
end;