永发信息网

oracle错误,PLS-00103:Encounterred the symbol ''UPDATE'' when expecting one of the

答案:2  悬赏:10  手机版
解决时间 2021-03-21 12:11
create or replace procedure emp_comm
as
vsal emp.sal%type;
cursor c_get_sal is select * from emp for update;
Begin
open c_get_sal;
fetch c_get_sal.sal into vsal;
while c_get_sal%found loop
case

when vsal>5000 then
update emp set falg='high' where current of c_get_sal;
when vsal>=3000 and vasl<=5000
update emp set flag='middle' where current of c_get_sal;

else
update emp set flag='low' where current of c_get_sal;
end case;
fetch c_get_sal.sal into vsal;
end loop;
close c_get_sal;
commit;
exception when others then
dbms_output.put_line('couwu');
rollback;
end;

PROCEDURE QRY.EMP_COMM 编译错误

错误:PLS-00103: Encountered the symbol "UPDATE" when expecting one of the following:

* & - + / at mod remainder rem then and or
|| multiset
The symbol "then" was substituted for "UPDATE" to continue.
行:14
文本:update emp set flag='middle' where current of c_get_sal;
最佳答案
这边锁表了,把for update给去掉即可
满意请采纳
全部回答
期待看到有用的回答!
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
63/45约分 怎么做
达州哈龙包子加盟吗?加盟费多少?
单选题国家的起源是A.阶级矛盾调和的产物B.由
二o o六年农历三月十九日是什么星座
网吧上网要2元一小时 家里上网多少钱一小时
我在上海工作交金,但是江苏户口,谁能告诉我
电影中大白有什么功能?
中国移动峪山方集李振华指定专营店地址有知道
小米盒子HDP更新了怎么没有湖南卫视了
长沙的射手座和蝴蝶树的多人艺术照大概需要多
单选题做馒头的面粉要不要添加增白剂,此类问
空白护照去巴厘岛,香港转机需要签证吗?
冰箱风扇坏会有什么反应
80字人物外貌描写不准复制!
黑水桥在什么地方啊,我要过去处理事情
推荐资讯
东营到淮南有多少公里,淮南开车到山东东营要
c#中什么操作符被用来说明两个条件同为真的情
新手玩文明5 应该玩哪个难度 选什么地图
什么是图文档管理系统
分期乐提现额度怎么提升
存折取钱必须本人吗,存折取钱不是本人能取吗
蛋黄派等食品常采用充气包装,所充人的气体可
苹果手机型号N开头是什么意思
The teacher is waiting for the students___
我家的别墅,大家觉得怎么样
晚上我男朋友送我回家时和我发火了我心里好难
如果在饭店里打工的人死了而老板却避而不见该
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?