title: SQL Join query to return matching and non-matching record
body: <p>I am working on a SQL Syntax to write a Join query.
  I couldnt get the expected output, i request expert to help me.</p>
  
  <pre><code>Table: Table1
  
  ScriptNumber    Date Filled    RefillsLeft
  100               01/02/2014      1
  200               01/03/2014      0
  300               01/22/2014      3
  
  
  Table : Table 2 
  
  ScriptNumber    Date Filled    RefillsLeft
  100               02/02/2014      0
  
  Expected output
  
  ScriptNumber    Date Filled    RefillsLeft
  100               02/02/2014      0
  300               null            null
  </code></pre>
  
  <p>SQL Statement</p>
  
  <pre><code>SELECT Table_2.ScriptNumber
         ,Table_2.DateFilled
         ,Table_2.RefillsLeft
      FROM Table_1
      LEFT JOIN Table_2
          ON Table_1.ScriptNumber = Table_2.ScriptNumber
  </code></pre>