你写的存储过程在创建时应该没有问题,我已经试过了,我用的ORACLE90,
但你写的这个存储过程如果执行的话就会有问题,
如果EMP表中有“同名”的雇员时就会有问题,
你可以试一下这样做:把查询ENAME这个字段改为EMPNO这个字段,
EMPNO这个字段是主键不会有重复值出现!!
create or replace procedure update_sal 
(tmp_empno in emp.empno%type,incre_sal in emp.sal%type)
as
  old_sal emp.sal%type;
begin
  select sal into old_sal from scott.emp where empno = tmp_empno for update;
  if old_sal < 2000 then 
    update scott.emp set sal = sal+incre_sal where empno = tmp_empno;
    commit;
  end if;
  exception when others then 
    rollback;
end update_sal;创建后做测试:
BEGIN
update_sal(7369,900);
END;如果就是想UPDATE名字相同的雇员数据,
可以用游标来做!!