我尝试在Oracle 11g上运行以下触发器代码:
create trigger attempt
before insert on orde
for each row
begin
if(:new.supplierid < 10) or (:new.supplierid > 99) then
dbms_output.put_line('SUPPLIERID SHOULD BE BETWEEN 11 AND 99');
end if;
end;
它成功创建了触发器,但在将任何值插入表orde
时,会产生以下错误:
ORA-04098: trigger 'GOOGLE.ATTEMPT' is invalid and failed re-validation
为什么会出现此错误?