• MyDoggieJessie (2/6/2016)


    I don't fully understand how this works to detect changes at the table level. BOL states that 'ALL' is the default value yet using 'ALL' doesn't work when you try to run it? What am I missing?

    SELECT CHECKSUM_AGG(ALL) FROM dbo.MyTable

    Check the syntax diagram in Books Online: "CHECKSUM_AGG ( [ALL | DISTINCT ] expression )"

    Your example code has the ALL, but fails to specify the expression,

    Also, as already explained above, using this to detect changes is only valid if you can accept to miss some changes.


    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/