title: MySQL: export multiple tables to CSV file
body: <p>I'm trying to export multiple MySQL tables into a single CSV file, these tables have different number of columns and have nothing in common. An example is below:</p>
  
  <p>table1:</p>
  
  <pre><code>ID|    Name
  1 |    Ted
  2 |    Marry
  null|    null
  </code></pre>
  
  <p>table2:</p>
  
  <pre><code>Married|    Age    |    Phone
  Y      |    35     |    No
  N      |    25     |    Yes
  Y      |    45     |    No
  </code></pre>
  
  <p>The result that I want to get is:</p>
  
  <pre><code>ID|    Name  |   Married    |    Age    |     Phone
  1 |    Ted   |   Y          |    35     |     No
  2 |    Marry |   N          |    25     |     Yes
  null|  null  |   Y          |    45     |     No
  </code></pre>
  
  <p>Is it possible to do using MySQL commands? I have tried all types of <code>join</code> but it doesn't give me the result that I need.</p>