title: Why does a query with an invalid subselect run?
body: <p>Saw a colleague run a query today and I couldn't explain why or how it didnt fail.
  The query was (abstracted):</p>
  
  <pre><code>UPDATE table1
  SET columnToUpdate = 1
  WHERE recordID IN (
  SELECT recordID FROM table2 WHERE table2column IN ( *list of values*))
  </code></pre>
  
  <p>The problem was he had mistaken recordID, which is only present in table1, for personID, which is present in both tables and is a PK in table 1, FK in table 2.</p>
  
  <p>I would have thought the query would not have run, due to the subselect being unable to resolve (indeed, if you run the subselect alone, it fails). 
  Instead, running the above query updated all records in table1, which were previously a combination of NULL and 0.</p>
  
  <p>It was simple to fix, but can anyone explain why this behaviour would take place? </p>
  
  <p>Thanks!</p>