表名是student,表中有3个字段id,name,grade
下面是创建触发器的代码:
create or replace trigger insert_update
  after insert or update of grade on student for each row
begin
  if inserting then
    dbms_output.putline('插入操作!');
  else
    dbms_output.putline('更新操作!');
  end if;
  
  if :new.grade<60 then
    dbms_output.putline(:new.name||'的成绩不及格!将删除之');
    delete from student where id=:new.id;
  else
    dbms_output.putline('该生成绩及格!');
  end if;
end;
这里,先谢过各位了。