June 27, 2012 at 1:14 am
Comments posted to this topic are about the item Find List of Columns Updated inside Trigger
February 10, 2014 at 7:54 am
The only thing I don't like about this at first glance is there is no check to see if the data actually changed. So if I issue the statement...
UPDATE Users
SET user_name = user_name
WHERE user_id = 'Fred1234';
...then the code fragment supplied will say the column was updated, when in fact nothing changed.
February 10, 2014 at 12:39 pm
I agree Matt. This is what I use in my triggers to see if a change has actually occurred.
IF EXISTS (SELECT *
FROM
INSERTED I JOIN DELETED D ON I.Key = D.Key
WHERE
I.Col <> D.Col)
May 10, 2016 at 9:32 am
Thanks for the script.
May 10, 2016 at 10:48 am
Iwas Bornready (5/10/2016)
Thanks for the script.
What script? Looks to me like you are just trying to increase your post count.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy