Click here to Skip to main content
15,913,083 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Friends,

Could you please tell me the advantages and disadvantages of triggers in sql server?

I have already gone through some links.

But, I need some clear explanation.

Please reply me.

Regards,

Ragamaie
Posted
Updated 19-Jul-17 23:21pm

I know you have gone through links, but check this.

http://www.mysqltutorial.org/sql-triggers.aspx[^]

Its short and concise and to the point! A good starting place.
 
Share this answer
 
v2
check this out:

Triggers -- Sql Server[^]

hope it helps :)
 
Share this answer
 
Disadvantages(Problems) of Triggers

It is easy to view table relationships , constraints, indexes, stored procedure in database but triggers are difficult to view.
Triggers execute invisible to client-application application. They are not visible or can be traced in debugging code.
It is hard to follow their logic as it they can be fired before or after the database insert/update happens.
It is easy to forget about triggers and if there is no documentation it will be difficult to figure out for new developers for their existence.
Triggers run every time when the database fields are updated and it is overhead on system. It makes system run slower.
 
Share this answer
 
Comments
pramodkumarw 10-Apr-13 9:34am    
this statement is wrong
"Triggers run every time when the database fields are updated and it is overhead on system. It makes system run slower."

make u sure throught practical before answering.
--------------------------------------------------------
when i added column in trigger attached table then there is not trigger fired for insert,update,delete

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900