When do triggers fire and when don't they

后端 未结 4 2029
感动是毒
感动是毒 2021-02-20 16:54

Pretty general question regarding triggers in SQL server 2005.

In what situations are table triggers fired and what situations aren\'t they?

Any code examples to

4条回答
  •  野的像风
    2021-02-20 17:18

    I thought I'd highlight from the link Eric posted a situation in which a trigger would not fire:

    Although a TRUNCATE TABLE statement is in effect a DELETE, it cannot activate a trigger because the operation does not log individual row deletions. However, only those with permissions on a table to execute a TRUNCATE TABLE need be concerned about inadvertently circumventing a DELETE trigger with a TRUNCATE TABLE statement.

提交回复
热议问题