Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can you set off a trigger based on one column changing?
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01466971
Message ID:
01466974
Vues:
62
Follow-up reply...some people will put the line


IF UPDATE(ColumnName)......

in a trigger.



This does NOT check if values changed...it only tells you if the column was referenced in an UPDATE statement. If I say

UPDATE ProductMaster Set Price = Price where ProductKey = 100


The IF UPDATE(ProductMaster.Price) would return a TRUE, which is generally not desirable behavior.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform