Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Triggers

Status
Not open for further replies.
Jun 29, 2001
195
US
Is it not possible to have more than one INSERT, UPDATE trigger on a specified table?

TIA

Ashley L Rickards
SQL DBA
 
You can have as many as you want.
When you design them they should be autonomous ie they should not impact eachother.
The order in which the triggers is called is not guarenteed so if you wanted trigger A to run before trigger b you need to combine them into one trigger.


Hope I've been helpful,
Wayne Francis

If you want to get the best response to a question, please check out FAQ222-2244 first
 
That's what I thought. Here's my issue. On my employee table there are 2 existing triggers one is a DELETE and the other an INSERT, UPDATE. I have a new trigger which is also an I,U. When I apply the new trigger the other I,U is replaced. Very odd and frustrating.

Thanks Wayne.

Ashley L Rickards
SQL DBA
 
They have to have different names.

If the new trigger has the same as the old it will overwrite it.

TR
 
I just found the problem. For some reason the db is set to 6.5 compatibility. In this level only one of each type can be applied to a table.

Ashley L Rickards
SQL DBA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top