17,081
社区成员
发帖
与我相关
我的任务
分享
--存储过程如下:
-- 借 5 楼
create or replace procedure pro_AddWage as
i number:=0;
begin
select count(*) into i from scott.emp e where e.sal<3500;
if i>0 then
update scott.emp e set e.sal=e.sal+500 where e.sal<3500;
commit;
end if;
end;
/ -- 创建完成后, 要加这个
--调用:
begin
pro_AddWage;
end;
--存储过程如下:
create or replace procedure pro_AddWage as
i number:=0;
begin
select count(*) into i from scott.emp e where e.sal<3500;
if i>0 then
update scott.emp e set e.sal=e.sal+500 where e.sal<3500;
commit;
end if;
end;
--调用:
begin
pro_AddWage;
end;