但用如下触发器我进行测试的时候,发现插入A表合格的数据后,B表依然没有被插入
请教下大家
Create Or Replace Trigger test
Before INSERT ON T_A
for each row
when (Old.CJ='合格')
DECLARE
begin
INSERT INTO T_B(ID,LSH,CJ) VALUES(:NEW.ID,:NEW.LSH,:NEW.CJ);
end test;
1 个解决方案
#1
Create Or Replace Trigger tests
Before INSERT ON T_A
for each row
begin
if :NEW.CJ ='合格' then
INSERT INTO T_B(ID,LSH,CJ) VALUES(:NEW.ID,:NEW.LSH,:NEW.CJ);
end if;
end tests;
#1
Create Or Replace Trigger tests
Before INSERT ON T_A
for each row
begin
if :NEW.CJ ='合格' then
INSERT INTO T_B(ID,LSH,CJ) VALUES(:NEW.ID,:NEW.LSH,:NEW.CJ);
end if;
end tests;