title: SQL Server : how to force NOT NULL in a column only if another column in the same table is a specific value?
body: <p>I'm very new to SQL so any help on this would be greatly appreciated. </p>
  
  <p>I have the following table:</p>
  
  <p><a href="https://i.stack.imgur.com/V6XsG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/V6XsG.png" alt="enter image description here"></a></p>
  
  <p>I need to force NOT NULL on <code>BusinessName</code> and <code>BusinessType</code>, but only if <code>CustomerType = 'Business'</code>. I have already added a constraint on the <code>CustomerType</code> column so that only <code>Business</code> or <code>Personal</code> will be accepted. </p>
  
  <p>If the user wants to set up a personal account, NULL will be accepted in the <code>BusinessName</code> and <code>BusinessType</code> columns. </p>