title: NULL values are excluded. Why?
body: <p>This is about a bizarre behaviour I found in Microsoft Sql Server. Please correct me if I'm wrong.</p>
  
  <pre><code>SELECT COUNT(*) FROM TABLEA 
  WHERE [Column1] IS NULL;
  </code></pre>
  
  <p>This returns 30018 rows.</p>
  
  <pre><code>CREATE VIEW VIEWB AS 
  SELECT * FROM TABLEA AS t1 
  WHERE t1.[Column1] NOT IN ('Cross/Up sell', 'Renegotiation', 'Renewal')  
  </code></pre>
  
  <p>If I check <code>VIEWB</code>, I don't find <code>NULL</code> in <code>Column1</code>: </p>
  
  <pre><code>SELECT COUNT(*) FROM VIEWB 
  WHERE [Column1] IS NULL;
  </code></pre>
  
  <p>This returns 0 rows.</p>
  
  <p>Why? The query above excludes the 3 values, but <strong>it isn't supposed to exclude NULL</strong>. Why does Ms Sql Server behave this way? Should I have expected this?
  How can I fix it?</p>