Check if row or table content has changed

By using CHECKSUM and CHECKSUM_AGG function in SQL Server, we could easily notice that if anything has changed or not.

-- Check Row:
SELECT CHECKSUM(*) 
FROM TableFoo
WHERE ID = 1;

-- Check Table:
SELECT CHECKSUM_AGG(CHECKSUM(*))
FROM TableFoo

你可能感兴趣的:(content)