title: Why MySQL's LEFT JOIN is returning "NULL" records when with WHERE clause?
body: <p>Today I've tried some more complex MySQL queries and I've noticed that MySQL's LEFT JOIN is not working with WHERE clause. I mean, it does return some records but it does not return the ones which are empty on the right side. </p>
  
  <p>For example let's say we've got to tables:</p>
  
  <pre>albums                                   ; albums_rap
    id artist        title         tracks  ;    id artist    title           rank
  ---- -------- ---------- --------------- ;  ---- --------- ----- --------------
     1 John Doe     Mix CD              20 ;     3 Mark      CD #7            15
     2 Mark          CD #7              35 ;</pre>
  
  <p>And when I run this query:</p>
  
  <pre><code>SELECT 
      t1.artist as artist,
      t1.title as title,
      t1.tracks as tracks,
      t2.rank as rank,
  FROM
      albums as t1
  LEFT JOIN
      albums_rap as t2
  ON 
      t1.artist LIKE t2.artist
  AND
      t1.title LIKE t2.title
  WHERE
      t2.rank != 17
  </code></pre>
  
  <p>I get this:</p>
  
  <pre>artist title tracks  rank
  ------ ----- ------ -----
  Mark   CD #7     35    15</pre>
  
  <p>but when I replace "WHERE" with "AND" in this query I get:</p>
  
  <pre>artist     title tracks  rank
  ------ --------- ------ -----
  Mark       CD #7     35    15
  John Doe  Mix CD     20  NULL</pre>
  
  <p>Why the first one is not returning records with "NULL" (null is not equal to 17...)</p>
  
  <p>I hope You understood what I meant and you'll explain somehow me the difference. Sorry for my bad english, it's not my mother tongue.</p>