title: Conditional JOIN different tables
body: <p>I want to know if a user has an entry in <strong>any</strong> of 2 related tables.</p>
  <p><strong>Tables</strong></p>
  <pre><code>USER (user_id)
  EMPLOYEE (id, user_id)
  STUDENT (id, user_id)
  </code></pre>
  <p>A User may have an employee and/or student entry. How can I get that info in one query?
  I tried:</p>
  <pre><code>select * from [user] u
  inner join employee e 
      on e.user_id = case when e.user_id is not NULL 
                          then u.user_id 
                          else null 
                     end
  inner join student s 
      on s.user_id = case when s.user_id is not NULL 
                          then u.user_id 
                          else null 
                     end
  </code></pre>
  <p>But it will return only users with entries in <strong>both</strong> tables.</p>
  <h3><a href="http://sqlfiddle.com/#!3/90216/2" rel="noreferrer">SQL Fiddle example</a></h3>