-2
我有這樣的觸發觸發錯誤(14,1):PLS-00103:遇到下列其中一項時遇到符號「THEN」::=。 (%;
create or replace
trigger trg_cust
after insert or update on nbty_customer
referencing old as old new as new
for each row
declare
sal_diff number;
begin
if(:new.cust_sal>:old.cust_sal)
then
update nbty_cache_cust set cust_nbty_sal=:new.cust_sal where cust_nbty_id=:old.cust_id;
elseif(:new.cust_sal<:old.cust_sal)
then
update nbty_cache_cust set cust_nbty_sal=:old.cust_sal+:new.cust_sal where cust_nbty_id=:old.cust_id;
end if;
end;
但這扔
Error(14,1): PLS-00103: Encountered the symbol "THEN" when expecting one of the following: := . (% ;
我沒有得到什麼是錯的這個好心幫的
只是一個小題目的問題。爲什麼你不喜歡格式化的代碼? –
我不知道如何格式化它這裏 –
http://stackoverflow.com/help/formatting –