title: Simple SQL statement combining two tables
body: <p>I'm fairly new to SQL, and have the following problem. Consider these tables 'Cars' and 'Colors':</p>
  
  <pre><code>[Cars]
  CarID   | Brand | ColorID   | Amount
  1       | Ford  | 10        | 23
  2       | VW    | 11        | 15
  3       | Opel  | 11        | 12
  4       | Opel  | NULL      | 21
  5       | Ford  | NULL      | 16
  
  [Colors]
  ColorID | ColorName 
  10      | Blue
  11      | Red
  12      | White
  13      | Green
  </code></pre>
  
  <p>I want to have a query that lists all Cars with their ColorNames, so that I have this output:</p>
  
  <pre><code>CarID   | Brand | ColorName | Amount
  1       | Ford  | Blue      | 23
  2       | VW    | Red       | 15
  3       | Opel  | Red       | 12
  4       | Opel  | NULL      | 21
  5       | Ford  | NULL      | 16
  
  SELECT CarID, Brand, ColorName, Amount 
  FROM Cars, Colors 
  WHERE Cars.ColorID = Colors.ColorID
  </code></pre>
  
  <p>leaves out the records where ColorName = NULL.</p>
  
  <pre><code>SELECT CarID, Brand, ColorName, Amount 
  FROM Cars, Colors 
  WHERE Cars.ColorID = Colors.ColorID OR 
        Cars.ColorId IS NULL 
  </code></pre>
  
  <p>yields too many records.</p>
  
  <p>What SQL statement do I need here? I'm using Microsoft SQL Server 2012.</p>
  
  <p>Thanks,
  Cooz</p>