title: SQL Server 2005 - Check for Null DateTime Value
body: <p>I'm trying to count the number of records that have a null DateTime value. However, for some reason, my attempts have failed. I have tried the following two queries without any luck:</p>
  
  <pre><code>SELECT COUNT(BirthDate) 
    FROM Person p
   WHERE p.BirthDate IS NULL
  </code></pre>
  
  <p>and</p>
  
  <pre><code>SELECT COUNT(BirthDate)
    FROM Person p
   WHERE p.BirthDate = NULL
  </code></pre>
  
  <p>What am I doing wrong? I can see records with a BirthDate of NULL when I query all of the records.</p>