PL/SQL: ORA-00933: SQL 命令未正确结束 两个错误怎么都不知道为什么..菜鸟求助 20
createtriggerupdatecafterupdateordeleteofbalanceonaccount2foreachrowbeginifinsertingt...
create trigger updatec after update or delete of balance on account2
for each row
begin
if inserting then
update customer2 set sum_balance =:new.balance where customer_name=:new.customer_name;
else
update customer2 set sum_balance =null where customer_name =:new .customer_name;
end if;
end ;
[Error] PLS-00103 (8: 15): PLS-00103: 出现符号 "end-of-file"在需要下列之一时:
( begin case
declare else elsif end exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimi
( begin case
declare else elsif end exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimi 展开
for each row
begin
if inserting then
update customer2 set sum_balance =:new.balance where customer_name=:new.customer_name;
else
update customer2 set sum_balance =null where customer_name =:new .customer_name;
end if;
end ;
[Error] PLS-00103 (8: 15): PLS-00103: 出现符号 "end-of-file"在需要下列之一时:
( begin case
declare else elsif end exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimi
( begin case
declare else elsif end exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimi 展开
2个回答
展开全部
create trigger updatec after update or delete of balance on account2
for each row
begin
if inserting then
begin
update customer2 set sum_balance =:new.balance where customer_name=:new.customer_name;
end;
else
begin
update customer2 set sum_balance =null where customer_name =:new .customer_name;
end;
end if;
end ;
for each row
begin
if inserting then
begin
update customer2 set sum_balance =:new.balance where customer_name=:new.customer_name;
end;
else
begin
update customer2 set sum_balance =null where customer_name =:new .customer_name;
end;
end if;
end ;
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
LZ贴的这个没有错,估计你实际的代码多了一个逗号吧?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询