title: Unable to add check in SQL server
body: <p>I m trying to add a check in sql server that its column value should not be greater than other tables count but it isn't working</p>
  
  <pre><code>alter table person add cnt int
      constraint CK_CONSS check (pnum &lt; select count(*) from Gender)
  </code></pre>