title: Calculate Hash or Checksum for a table in SQL Server
body: <p>I'm trying to compute a checksum or a hash for an entire table in SQL Server 2008. The problem I'm running into is that the table contains an XML column datatype, which cannot be used by checksum and has to be converted to nvarchar first. So I need to break it down into two problems:</p>
  
  <ol>
  <li>calculate a checksum for a row, schema is unknown before runtime.</li>
  <li>calculate the checksum for all of the rows to get the full table checksum.</li>
  </ol>