这是我在 Oracle PL/SQL 中的触发器的代码:
create or replace trigger checkemp
before insert or update
on employee
for each row
declare
age number;
begin
if(:new.age>50)
then
insert into nonemp values(:new.emp,:new.empname);
end if;
end;
/
当我输入以下语句时:
insert into employee values(3434,'dfjkhsfk','dkjfhdfd','12-AUG-94',60);
甲骨文给了我错误
ERROR at line 1:
ORA-04098: trigger 'SYSTEM.AGEDETAILS' is invalid and failed re-validation
该代码应该将emp(员工编号)和empname(员工姓名)存储到表nonemp中。
请帮忙。