Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Overiding triggers!
>Is it possible to stop a trigger from executing in certain situations.
>An example of why I would do this: An insert trigger assigns a sequence
>value to a field. However on some insert events I would like to assign a
>value from another source to this field.
>
>Thanks in advance
>
>George
>
You could only fire your trigger when your id field is null
e.g.
create trigger X_INS_TRG
before insert
on X
when ( new.id_field is null)
begin
select X_SEQ.nextval into :new.id_field fom dual; end;
![]() |
![]() |