Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can you set off a trigger based on one column changing?
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01466971
Message ID:
01466974
Views:
61
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform