Oracle 隐式游标SQL

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_28061489/article/details/79619562
-- 根据用户输入的员工号,更新指定员工的工资,比如工资涨100
declare
begin
  update empnew set sal = sal + 100 where empno = &eno;
  if sql%found then
    dbms_output.put_line('成功修改员工工资');
    commit;
  else
     dbms_output.put_line('修改员工工资失败');
     rollback;
  end if;
end;

select * from empnew where empno = 7902;

猜你喜欢

转载自blog.csdn.net/qq_28061489/article/details/79619562