x

Can any one please let me know why we need to create multiple triggers for one event ?

Hi All,

Recently I observed that in one table there are more than 4 triggers are there for after Update event. Can you please let me know why we need to create multiple triggers for one particular event(insert / update / delete) instead of one triggers.

Is there any performance benefits ?

How many triggers can we create on one table ?

what is the max limit to create the triggers for same event(insert / update / delete) ?

Thanks in Advance....

Regards, Satya

more ▼

asked Aug 07, 2012 at 06:15 PM in Default

avatar image

satya
361 18 19 26

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

There won't be a performance benefit for multiple triggers, no. In fact, it's a hidden performance cost. Every time you get an UPDATE you'll have four triggers firing. The number of triggers per table is only limited by the number of objects in a database 2,147,483,647.

Remember, the books online is your friend. You can always find this sort of information there: http://msdn.microsoft.com/en-us/library/ms143432.aspx

Personally, I'd be very concerned if I had four triggers on a table. What do they do? Are triggers the right way to get that job done?

more ▼

answered Aug 07, 2012 at 07:18 PM

avatar image

Grant Fritchey ♦♦
137k 20 43 81

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x290
x141

asked: Aug 07, 2012 at 06:15 PM

Seen: 816 times

Last Updated: Aug 08, 2012 at 05:34 AM

Copyright 2016 Redgate Software. Privacy Policy