title: SQL table self-reference query vs. unique constraints using checksum
body: <p>I would like to better understand the differences for checking uniqueness in a record before an INSERT between using <strong>CHECKSUM (with unique constraints)</strong> versus <strong>self-referencing table</strong> statement like the one below. What scenarios would pose one option to be the best choice over the other, and for what reasons?</p>
  
  <p>Requirement: <em>Each set of columns need to be unique from every record in the table, which is why I put this statement together; to check for all columns in one call to the database.</em></p>
  
  <pre><code>INSERT INTO tblTable
  (Column1, Column2, Column3, Column4, Column5, Column6) 
  SELECT 
  @Column1, @Column2, @Column3, @Column4, @Column5, @Column6 
  WHERE NOT EXISTS 
      (SELECT DISTINCT 
          t1.Column1, 
          t1.Column2,  
              t2.Column3, 
              t2.Column4, 
                  t3.Column5, 
                  t3.Column6 
      FROM tblTable t1 
          JOIN tblTable t2 ON (t1.UID = t2.UID)
          JOIN tblTable t3 ON (t1.UID = t3.UID)
      WHERE
          t1.Column1 = @Column1 and 
          t1.Column2 = @Column2 and 
              t2.Column3 = @Column3 and 
              t2.Column4 = @Column4 and 
                  t3.Column5 = @Column5 and 
                  t3.Column6 = @Column6)
  </code></pre>