Checksum_AGG, BINARY_CHECKSUM

  • Hi,
    I am not getting the checksum_agg and binary_checksum. I understood that it is used to detect changes to the row of the table. But could not understand how it is getting the value. I tried to search over the internet. read some posts but still cant get it.
    Can someone enlighten me on this topic

  • susmitha117 - Wednesday, December 13, 2017 10:31 AM

    Hi,
    I am not getting the checksum_agg and binary_checksum. I understood that it is used to detect changes to the row of the table. But could not understand how it is getting the value. I tried to search over the internet. read some posts but still cant get it.
    Can someone enlighten me on this topic

    These types of aggregate checksums typically use a simple XOR (Exclusive OR) to hash out a value.  Please see the post by Erland Sommarskog in the following link.
    https://social.msdn.microsoft.com/Forums/aspnet/en-US/484c302a-adfb-4dd2-a119-cff921c977bb/checksumagg-how-does-it-work

    I tend to steer clear of such things because they aren't guaranteed to work as most people would think.

    There are other types of checksums, as well.  For example, all credit card numbers are based on a LUHN Mod 10 Checksum and have a "Check Sum Digit" that is calculated from the rest of the digits using the algorithm at the following link.
    https://en.wikipedia.org/wiki/Luhn_algorithm

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply