title: SELECT * FROM Employees WHERE NULL IS NULL; SELECT * FROM Employees WHERE NULL = NULL;
body: <p>I have recently started learning oracle and sql. 
  While learning I encountered a couple of queries which my friend was asked in an interview.</p>
  
  <pre><code>SELECT * 
  FROM Employees  
  WHERE NULL IS NULL;
  </code></pre>
  
  <p>this query yields all the rows in the Employees table. 
  As for as I have understood Oracle searches data in columns, so, NULL, is it treated as a column name here?
  Am I correct when I say that Oracle searches for data in columns?
  How come Oracle gives all the rows in this query?
  In WHERE clause, is it not must that the left hand side of a condition be a COLUMN NAME? 
  Shouldn't it throw an error? </p>
  
  <pre><code>SELECT * 
  FROM Employees 
  WHERE NULL = NULL; 
  </code></pre>
  
  <p>gives NO ROWS SELECTED.</p>
  
  <p>Well, I understand that I can not compare a NULL value using operators except IS NULL and IS NOT NULL. 
  But why should it yield a result and not an error. 
  Could somebody explain me this. 
  Does Oracle treat NULL as a column as well as empty cells?</p>