title: Add columns including their type of one table to another table (Postgres)
body: <p>I have two database tables</p>
  <p><strong>Table1</strong></p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>id</th>
  <th>col1: type1</th>
  <th>col2: type2</th>
  <th>col3: type3</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>val1</td>
  <td>val2</td>
  <td>val3</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p><strong>Table2</strong></p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>id</th>
  <th>col4: type4</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>val4</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I want to dynamically add Table2 to Table1, in way that I don't only insert the value but also add the typed column:</p>
  <p><strong>Table1</strong></p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>id</th>
  <th>col1: type1</th>
  <th>col2: type2</th>
  <th>col3: type3</th>
  <th>col4: type4</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>val1</td>
  <td>val2</td>
  <td>val3</td>
  <td>val4</td>
  </tr>
  </tbody>
  </table>
  </div>