Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Which trigger fires first?
If there exists two triggers on a table that are both 'before insert or
update' how can I know which trigger fires first?
Can I specify a sequence, ie tell the db i want this trigger to fire first?
I my db I have on each table a 'before insert or update' trigger that fetches a sequence.nextval into the primary key and updates others fields common to all tables. These triggers are all alike and made after a template. I dont want to edit these individually.
However i want to write triggres to enforce constraints on individual
tables like:
create table t(a int primary key, b int references t)
with the rule that b may be null, and at most one row can be referenced by
another.
How do I write an efficient trigger to enforce this? (assuming a trigger as
mentiod above is in place)
Thanks
Peter
Received on Fri Jul 30 1999 - 03:49:02 CDT
![]() |
![]() |