实用system 授权
grant dba to scott --授权dba权限
1.创建存储过程
create or replace procedure pro_add_sal(eno in number)-- 输入变量 in表示输入参数 out 表示输出 number参数类型
as --定义变量
psal number;
begin
select sal into psal from emp where empno=eno; --查寻
update emp set sal=sal+100 where empno=eno; -- 修改数据
commit; --提交
end;
效果:
2. 调用存储过程
declare
begin
pro_add_sal(7369);
end;
效果查询