ORA-04098: 触发器 'SCOTT.ORDERDELETE' 无效且未通过重新验证 create trigger orderupdate
before update on orderform_list for each row
begin
update orderform set diaodu=1
from orderform a,deleted d,inserted i
where a.orderform_id=d.orderform_id
end
orderupdate
create trigger orderdelete
before delete on orderform_list
for each row
begin
delete orderform
from orderform a,deleted b
where a.orderform_id=b.orderform_id
end
orderform_list
--改一下试试
CREATE TRIGGER orderupdate
BEFORE UPDATE ON orderform_list
FOR EACH ROW
BEGIN
UPDATE orderform
SET diaodu = 1 FROM orderform a
WHERE a.orderform_id = :new.orderform_id;
END orderupdate;
/
CREATE TRIGGER orderdelete
BEFORE DELETE ON orderform_list
FOR EACH ROW
BEGIN
DELETE orderform FROM orderform a
WHERE a.orderform_id = :old.orderform_id;
END orderdelete;
/