insert into table2(idB)
   select id1 from table1