关于Oracle触发器的问题
我想在向表DBZ1001插入新的记录的同时,把这条新的记录插入到DBZ1002表中,所以下了下面这个触发器,可是总是有编译错误码,请大家帮我看看错在哪里了好吗?应该怎么改正?
CREATE OR REPLACE TRIGGER system.TRG1_DBZ1001 AFTER
INSERT ON system.DBZ1001
BEGIN
INSERT INTO system.DBZ1002 VALUES (NEW.CJSJ,NEW.QLYYL,NEW.QLYWD,
NEW.ZLYYL,NEW.ZLYWD,NEW.BJKYL1,NEW.BJKYL2,NEW.BJKYL3,NEW.BJKYL4,
NEW.BCKYL1,NEW.BCKYL2,NEW.BCKYL3,NEW.BCKYL4,NEW.CZYL,
NEW.CZWD,NEW.YW1,NEW.YW2,NEW.YW3,NEW.YW4,NEW.QDWD1,NEW.HDWD1,
NEW.QDWD2,NEW.HDWD2,NEW.QDWD3,NEW.HDWD3,NEW.QDWD4,NEW.HDWD4,
NEW.RQBJ1,NEW.RQBJ2,NEW.RQBJ3,NEW.RQBJ4,NEW.DJDL1,NEW.DJDL2,
NEW.DJDL3,NEW.DJDL4,NEW.DDY,NEW.GDY,NEW.DDJC,NEW.KZ,NEW.ZT1,
NEW.ZT2,NEW.ZT3,NEW.ZT4,NEW.YL1,NEW.YL2,NEW.YL3,NEW.YL4);
END;
------解决方案--------------------错误贴出来
------解决方案--------------------CREATE OR REPLACE TRIGGER system.TRG1_DBZ1001 AFTER
INSERT ON system.DBZ1001
for each row
BEGIN
.......
end;
------解决方案--------------------加上for each row 后
NEW前面要加冒号