新手求问:如何实现这个触发器
这个我想用触发器实现,不知道该如何实现。我自己写了一个,但是老是提示编译错误。各位大侠帮我看看,是什么问题。或者重新帮我写一个。谢谢了。
CREATE or replace TRIGGER triggertest
AFTER INSERT ON teamInfo
referencing new as newone
declare
i number;
begin
i = (select havingTeam from CorpInfo
where CorpInfo.CorpID = newone.CorpID);
i++;
update carinfo
set havingTeam = i
where CorpInfo.CorpID = newone.CorpID;
end

