Check for changes to an SQL Server table?

Take a look at the CHECKSUM command:

SELECT CHECKSUM_AGG(BINARY_CHECKSUM(*)) FROM sample_table WITH (NOLOCK);

That will return the same number each time it’s run as long as the table contents haven’t changed. See my post on this for more information:

CHECKSUM

Here’s how I used it to rebuild cache dependencies when tables changed:
ASP.NET 1.1 database cache dependency (without triggers)

Leave a Comment

techhipbettruvabetnorabahisbahis forumu