Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does an update statement in update trigger, fire trigger again?

If I use an update statement in an update trigger, does that update statement in update trigger causes fire trigger?

like image 979
Ashish Avatar asked Sep 05 '13 10:09

Ashish


2 Answers

Make sure your database property for RECURSIVE_TRIGGERS is set to off (which is the default anyway) so that it cannot be fired recursively.

http://technet.microsoft.com/en-us/library/ms190946.aspx

like image 80
Massimiliano Peluso Avatar answered Oct 11 '22 08:10

Massimiliano Peluso


By default, a trigger doesn't fire himself.

like image 43
Cristian Abelleira Avatar answered Oct 11 '22 09:10

Cristian Abelleira