title: How to move data between 2 tables / with different columns in different databases
body: <p>We have the following scenario where <code>foo</code> has been renamed as <code>foo1</code>.</p>
  
  <p><code>foo.col1</code> has been renamed as <code>foo1.col11</code>.</p>
  
  <p><code>foo.col2</code> has been removed</p>
  
  <p>In fact these used to be similar tables and I would like to copy data from A to B for these tables. How would I go about doing a simple migration given that the table/column names have undergone a change.</p>
  
  <pre><code>Database 'A'
  create table foo {id pk, col1 varchar(255), col2 tinyint(1), col3 datetime);
  create table foo_bar1 (id pk, foo_id fk, col4 datetime, col5 varchar(255));
  
  Database 'B'
  create table foo1 {id pk, col11 varchar(255), col3 datetime);
  create table foo1_bar1 (id pk, foo1_id fk, col4 datetime, col5 varchar(255));
  </code></pre>