How can you make a trigger only go when a certain column is updated? The below trigger will go anytime the table is updated but I want it to go only what the name column in the table is updated. Also, how can I get what was in the column before and after it was changed.
CREATE TRIGGER tbl1_TrackUpdates ON [dbo].[Table2]
FOR INSERT, UPDATE
AS
update [dbo].[Table2] set [LastUpdatedDate] = getdate(), [LastUpdatedBy] = USER_NAME()