title: MySQL - Multiple tables results into column(kind of full outer join)
body: <p>I have 3 tables like below.</p>
  <h3>T1</h3>
  <pre><code>id, count
  1, 10
  2, 20
  3, 30
  </code></pre>
  <h3>T2</h3>
  <pre><code>id, status
  1, 100
  2, 200
  3, 300
  4, 400
  </code></pre>
  <h3>T3</h3>
  <pre><code>id, refresh
  2, 2000
  3, 3000
  </code></pre>
  <p>I want to convert all these table's 2nd columns into one result set.</p>
  <pre><code>id, count, status, refresh
  1,   10,   100,    NULL
  2,   20,   200,    2000
  3,   30,   300,    3000
  4,   NULL, 400,    NULL
  </code></pre>
  <p>Im not sure still full outer join supports this format. Any better way to do this?</p>
  <h2>Answer:</h2>
  <p>Since its closed, so posting the answer here:</p>
  <pre><code>SELECT COALESCE(T1.id, T2.id , T3.id), T1.count,T2.status,T3.refresh
  FROM T1 
  LEFT OUTER JOIN T2  USING (id)
  LEFT OUTER JOIN T3  USING (id)
  UNION 
  SELECT COALESCE(T1.id, T2.id , T3.id), T1.count,T2.status,T3.refresh
  FROM T2
  LEFT OUTER JOIN T1  USING (id)
  LEFT OUTER JOIN T3  USING (id)
  UNION 
  SELECT COALESCE(T1.id, T2.id , T3.id), T1.count,T2.status,T3.refresh
  FROM T3 
  LEFT OUTER JOIN T1  USING (id)
  LEFT OUTER JOIN T2  USING (id)
  </code></pre>