title: CHECK Constraint based on a column value IN OTHER Table
body: <h1>SqlServer</h1>
  <p>Suppose I have 2 tables:</p>
  <p>Table 1 - having column A</p>
  <p>Table 2 - having column B [Bit] Not Null</p>
  <p>Is it possible to have a Check Constraint, such that value of Column B can be &quot;0&quot;, only when Column A is NOT NULL.</p>
  <p><em>OR put it other way, value of Column B can be &quot;1&quot;, only when Column A is NULL.</em></p>
  <p>Thanks in advance.</p>