Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help Understanding This Syntax
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01410281
Message ID:
01410291
Vues:
33
>Hey, Kevin,
>
>In addition to Naomi's (really good) answer - one other thing to remember, in case you weren't aware. In SQL Server, a trigger fires once per statement, regardless of the # of rows being inserted/updated.
>
>So if someone issues an UPDATE statement (e.g. update Customers set CreditLimit = 5000 where CustomerType = 1)....the UPDATE trigger fires once, and the INSERTED/DELETED tables will contain the "before" and "after" values for the rows that were updated. (Some people assume the trigger will fire once for every row being updated, and that assumption is not correct)
>
>Part of the reason I mention this is beause some developers write code in triggers on the assumption that INERTED and DELETED will only ever have one row.

Good to know. Thanks.

Also, the tables contains the data BEFORE the action occurs? So the Deleted table contains the row prior to being deleted, or after?
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform