title: CHECK for two columns
body: <p>I have a problem with my code.
  As you can see i Try to have a sort of CHECK constraint using two columns in the same table but seems does not work.
  My need is to accept value in EffectiveEndDate only if they are > that EffectiveStartDate.</p>
  
  <p>Any idea how to solve it? thanks for your support! :-)</p>
  
  <pre><code>CREATE TABLE dbo.Test 
  (   
  EffectiveStartDate  dateTime2(2)        NOT NULL,
  EffectiveEndDate    dateTime2(2)        NOT NULL
      CONSTRAINT CK_CmsSponsoredContents_EffectiveEndDate CHECK (EffectiveEndDate &gt; EffectiveStartDate),
  );
  </code></pre>