title: Copying Data between two similar Databases
body: <p>I have two databases, Database A and Database B, which are the same except for about few new columns in some tables in Database B.</p>
  
  <p>The two databases contain the same number of tables (1160 tables). I  added columns to about 40 tables in Database B. That is the only thing different from Database A.</p>
  
  <p>I have emptied all tables in Database B and want to insert all data in each tables of Database A to Database B, leaving only the 40 tables that have the number of columns different from the source Database A.</p>
  
  <p>I need a script to loop through all tables in Database A, check if the columns are the same, then copy its contents to that table in Database B. If the columns are not the same, it should leave an error of the table name.</p>