Home » SQL & PL/SQL » SQL & PL/SQL » strange trigger (oracle XE apex)
strange trigger [message #359528] Mon, 17 November 2008 02:48 Go to next message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
hi,

it is very interesting on browsing someone's table i found the following. He has written three triggers using before insert.
In each trigger he has defined three different actions. For example in one trigger he has stored :new.sequence and another trigger he has made some calcuations using :new. etc etc. To me he could have written all the actions in one trigger which likely get fired before insert itself. Having maintaining three different triggers for the same before insert action, on what order the triggers will get fired. Is it based on the trigger name or based on the trigger created timestamp etc.

yours
dr.s.raghunathan
Re: strange trigger [message #359534 is a reply to message #359528] Mon, 17 November 2008 02:53 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
There is no defined order that the triggers will fire in untill you get to 11g.
Empirically, they fire in compilation order - the one compiled first fires first, but that is not defined anywhere, and cannot be relied upon.
Re: strange trigger [message #359535 is a reply to message #359528] Mon, 17 November 2008 02:54 Go to previous messageGo to next message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Order is undetermnistic.

Regards
Michel
Re: strange trigger [message #359540 is a reply to message #359535] Mon, 17 November 2008 02:59 Go to previous message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member

@JRowBottom and @Michel,
Thank you very much
yours
dr.s.raghuanthan
Previous Topic: Please help me with sqlplus reporting command
Next Topic: Oracle 7 Help
Goto Forum:
  


Current Time: Mon Dec 05 23:48:36 CST 2016

Total time taken to generate the page: 0.08527 seconds