title: Join within an "exists" subquery
body: <p>I am wondering why when you join two tables on a key within an exists subquery the join has to happen within the WHERE clause instead of the FROM clause.</p>
  
  <p>This is my example:</p>
  
  <p>Join within FROM clause:</p>
  
  <pre><code>SELECT payer_id
    FROM Population1
   WHERE NOT EXISTS
         (Select *
            From Population2 join Population1 
              On Population2.payer_id = Population1.payer_id)
  </code></pre>
  
  <p>Join within WHERE clause:</p>
  
  <pre><code>SELECT payer_id
    FROM Population1
    WHERE NOT EXISTS
          (Select *
             From Population2
            WHERE Population2.payer_id = Population1.payer_id)
  </code></pre>
  
  <p>The first query gives me 0 results, which I know is incorrect, while the second query gives the the thousands of results I am expecting to see.</p>
  
  <p>Could someone just explain to me why where the join happens in an EXISTS subquery matters? If you take the subqueries without the parent query and run them they  literally give you the same result.</p>
  
  <p>It would help me a lot to remember to not continue to make this mistake when using exists.</p>
  
  <p>Thanks in advance.</p>