create or replace trigger emp_dml_trg
after
insert or update or delete on emp
declare
dml_type char(10);
begin
if INSERTING then
dml_type:='INSERT';
elsif UPDATING then
dml_type:='UPDATE';
elsif DELETING then
dml_type:='DELETE';
end if;
insert into emp_lop
values(user,dml_type,to_char(sysdate,'yyyy-mm-dd hh:mi:ss'));
end;
/
提示编译错误 emp_lop表建好了没错 大虾们帮忙看下
after
insert or update or delete on emp
declare
dml_type char(10);
begin
if INSERTING then
dml_type:='INSERT';
elsif UPDATING then
dml_type:='UPDATE';
elsif DELETING then
dml_type:='DELETE';
end if;
insert into emp_lop
values(user,dml_type,to_char(sysdate,'yyyy-mm-dd hh:mi:ss'));
end;
/
提示编译错误 emp_lop表建好了没错 大虾们帮忙看下
after
insert or update or delete on emp1
declare
dml_type char(10);
begin
if INSERTING then
dml_type:='INSERT';
elsif UPDATING then
dml_type:='UPDATE';
elsif DELETING then
dml_type:='DELETE';
end if;
insert into emp_lop
values(user,dml_type,sysdate);
end; 没有发现错误