CREATE OR REPLACE TRIGGER updatecustomername
before update on item
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
if :NEW.customerid <> 0 then
select customername
into :NEW.customername
from customer where customerid=:NEW.customerid;
else
NEW.customername='test';(这句如果是null就是好的)
end if;
end;
/
有编译错误,不知道为何
before update on item
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
if :NEW.customerid <> 0 then
select customername
into :NEW.customername
from customer where customerid=:NEW.customerid;
else
NEW.customername='test';(这句如果是null就是好的)
end if;
end;
/
有编译错误,不知道为何
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货