• Sjimmo and Steve,

    It's like you say, but then it goes even a step further.

    The UPDATE() function does, as you indicate, not check if any values actually changed.

    But it also doe not check if any values were set to some (possibly unchanged) value.

    The only thing UPDATE() tells you is that the column is mentioned at the left-hand side of an =-mark in the SET phrase. So even if the table is empty, the WHERE does not match any rows, or even if the WHERE has an always false predicate, the UPDATE() function will still return TRUE for all columns that appear in the SET clause.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/