| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Table trigger and NEW value
Hi all,
> > CREATE or REPLACE TRIGGER t_nstudents
> > BEFORE
> > INSERT OR UPDATE OF ID_Cycle ON Students
...
> > SELECT COUNT(*) INTO actual_s
> > FROM students
> > WHERE ID_Cycle = :new.ID_Cycle ;
> You need the FOR EACH ROW clause to access the :new and
> :old variables.
...but row trigger fails; mutating table.
He should create a package including a PL&SQL-Table of ID_Cylces. A before (or after, thats the same) row trigger fills this table - and the after STATEMENT trigger validates each of ID_Cycles in this PL/SQL-Table.
cu
Andreas
Received on Wed Dec 19 2001 - 11:57:53 CST
![]() |
![]() |