Geeks Talk

Prepare for your Next Interview




Which trigger will fires first?

This is a discussion on Which trigger will fires first? within the SQL forums, part of the Databases category; If i have created triggers of same structure i.e both are on the same table, same event and same timing. Then which one will fires first? NOTE: [This question ...


Go Back   Geeks Talk > Databases > SQL

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 12-28-2006
Expert Member
 
Join Date: Oct 2006
Posts: 690
Thanks: 0
Thanked 49 Times in 41 Posts
JobHelper is on a distinguished road
Which trigger will fires first?

If i have created triggers of same structure i.e both are on the same table, same event and same timing. Then which one will fires first?

NOTE: [This question was asked by vishalkumar]
Reply With Quote
The Following 2 Users Say Thank You to JobHelper For This Useful Post:
Sponsored Links
  #2 (permalink)  
Old 02-06-2007
Expert Member
 
Join Date: Jun 2006
Location: India
Posts: 411
Thanks: 15
Thanked 33 Times in 25 Posts
jamesravid is on a distinguished road
Re: Which trigger will fires first?

In Oracle it is undefined. Any one of the triggers will fire first. It is better to merge them as a single trigger if there is any dependency in the order of execution.
__________________
Cheers,
:) James:)
Reply With Quote
The Following User Says Thank You to jamesravid For This Useful Post:
  #3 (permalink)  
Old 02-07-2007
Expert Member
 
Join Date: Jun 2006
Posts: 140
Thanks: 2
Thanked 12 Times in 9 Posts
Jim.Anderson is on a distinguished road
Re: Which trigger will fires first?

agree with james...

You can create multiple triggers of the same type (BEFORE, AFTER, INSTEAD OF) for the same triggering event. The order of execution among the triggers is indeterminate.
Reply With Quote
  #4 (permalink)  
Old 02-10-2007
Junior Member
 
Join Date: Feb 2007
Location: nasik (india)
Posts: 4
Thanks: 1
Thanked 1 Time in 1 Post
srwr_shaikh is on a distinguished road
Re: Which trigger will fires first?

can u send me answer about this
Reply With Quote
  #5 (permalink)  
Old 02-10-2007
Junior Member
 
Join Date: Feb 2007
Location: nasik (india)
Posts: 4
Thanks: 1
Thanked 1 Time in 1 Post
srwr_shaikh is on a distinguished road
Re: Which trigger will fires first?

plz send me
Reply With Quote
  #6 (permalink)  
Old 01-24-2008
Junior Member
 
Join Date: Jan 2008
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
chaitueeturi is on a distinguished road
Re: Which trigger will fires first?

the recently created trigger will be fired first

suppose u created trigger t1 and then t2 for the same instant
here t2 will be fired first and then t1
Reply With Quote
Reply

  Geeks Talk > Databases > SQL


Thread Tools
Display Modes



All times are GMT -4. The time now is 06:22 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved