title: Why does column = NULL return no rows?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1843451/why-does-null-null-evaluate-to-false-in-sql-server">Why does NULL = NULL evaluate to false in SQL server</a>  </p>
  </blockquote>
  
  
  
  <p>If you generate a query to insert the data in table "MyTab" for column --- Age, Sex, DOB, ID</p>
  
  <pre><code>INSERT INTO MyTab 
  VALUES (22, '', '', 4)
  </code></pre>
  
  <p>What'll be the value in column Sex &amp; DOB ?
  Is it NULL ?</p>
  
  <p>If value is NULL then --- </p>
  
  <pre><code> SELECT * FROM MyTab
   WHERE Sex=NULL
  </code></pre>
  
  <p>above query gives output ---- no rows selected --- why ??</p>
  
  <p>if value is not NULL then ---</p>
  
  <pre><code> SELECT * FROM Mytab
   WHERE Sex IS NULL
  </code></pre>
  
  <p>above query gives the output ---- how ??</p>