title: SQL Constraint conditional Check: if column0 is null, column1 is not null and vice versa
body: <p>I have this question around SQL constraints, in order to achieve following behavior:</p>
  
  <p>TableA has two columns
  column0 and column1, which only one can be NULL on data entry:
  e.g.:
  if column0 is null, column1 can't be null
  if column1 is null, column0 can't be null</p>
  
  <p>To achieve this, I've build following SQL constraints:</p>
  
  <pre><code>CONSTRAINT column01_not_null_chk
  CHECK (
    ( column0 IS NOT NULL
    AND column1 IS NULL )
  OR
    ( column1 IS NOT NULL
    AND column0 IS NULL ) )
  </code></pre>
  
  <p>is this correct to achieve my behavior? Because all SQL are rejected because of this constraint</p>