title: Mysql select IN return null if id not exists
body: <p>I have a table like this:</p>
  
  <pre><code>+----+---------+---------+
  | Id | column1 | column2 |
  +----+---------+---------+
  |  1 | a       | b       |
  |  2 | a       | b       |
  +----+---------+---------+
  </code></pre>
  
  <p>and a query like this <code>SELECT * FROM table WHERE id IN (1,2,3)</code></p>
  
  <p>what query do I need to get a result like this(I need to get null values for nonexisten id's):</p>
  
  <pre><code>+----+---------+---------+
  | Id | column1 | column2 |
  +----+---------+---------+
  |  1 | a       | b       |
  |  2 | a       | b       |
  |  3 | null    | null    |
  +----+---------+---------+
  </code></pre>
  
  <h1>EDIT</h1>
  
  <p>Thanks for the responses so far.</p>
  
  <p>Is there a more 'dynamic way' to do this, the query above it's just an example.
  In reality I need to check around 1000 id's!</p>