oracle中创建触发器错误,
小村长 2012-06-10 01:23:06 创建INSERT触发器t_inst_stu:在学生表(student)中每新增一名学生,若其班级编号非空,则将班级表(class)中相应班级的人数(c_total)自动加1。
这是我的代码
create or replace trigger t_inst_stu after insert on student
referencing old as old_value
new as new_value
for each row
when (new_value.clsno is not null)
begin
update class set c_total=c_total+1 where clsno=:new_value.clsno;
end;
现在的问题是当执行插入语句时,没反应,求大神指导。