Every one know's that: in the trigger, I may be changed because of the value of a field. I will trigger this trigger. OK. We will write if Update (column1) this statement is OK, but you need to know that it is based on your SQL statement. That is to say, the value of column1 in your database is, if you use an SQL statement to update column1 to A, then the if Update (column1) is still valid. I have repeatedly tried to find that if Update (column1) cannot judge your inserted
If it is the same as column1 in updated, it only determines whether set column1 = 'X' exists in your update statement. If it is true or not, false is returned.
So if you want to determine whether the original value is changed in this update, you should use this judgment
If (select count (*) from inserted a inner join deleted B on A. Primary Key = B. Primary Key and A. column1 = B. column1)> 0)
By making such a judgment, you will ensure that your value will return true only when it is changed.