• Delete should be based on business logics, as phone book example if you create unique index on phone number column then SQL Server will not allow duplicate phone number. This mean your phone book can not insert husband and wife who shares the same home phone number.

    CheckSum and Binary_CheckSum both are not reliable, they were orignally designed to check message integrity when sending secure messages, both parties can detect if message was altered. If you are on SQL Server 2005 then use HashBytes function.

    check sum and binary check sum can take the whole row and make things easy as example

    Select Binary_CheckSum(*) from table_name

    the hashbytes is limited to varchar,nvarchar and varbinary as input. You have to convert your columns to one of the supported data types.

    select HashBytes('SHA1', CONVERT(varchar,column_name)) from table_name

    use it with caution even a minor change like varchar to nvarchar will change the hashbytes value.

    select HashBytes('SHA1', CONVERT(nvarchar,column_name)) from table_name

    HashBytes

    http://msdn.microsoft.com/en-us/library/ms174415.aspx

    Binary_CheckSum

    http://msdn.microsoft.com/en-us/library/ms173784.aspx

    Duplicate rows are common in systems where you are importing data from other systems. There are few methods to delete duplicate rows in SQL server table.

    http://www.sqldba.org/articles/34-find-duplicate-records-to-delete-or-update-in-sql-server.aspx

    I hope it helps.


    Kindest Regards,

    Syed
    Sr. SQL Server DBA