BINARY_CHECKSUM is a nifty SQL Server function that allows for a hash of the provided columns. This can come in handy when trying to look for differences in table column values. The function can receive a variable number of columns (or * for all columns) of a table. A great use of this would be in detecting change between values over time for the Dimensions in a Data Warehouse data model.

 

example usages:

select BINARY_CHECKSUM(*) from table

select BINARY_CHECKSUM(column1, column2) from table