1.两张表数据结构一致
insert into tableB select * from tableA (这里可以输入过滤条件)
2.指定字段
insert into tableB (col1, col2, ...) SELECT col1, col2, ... FROM tableA;
3.插入B中不存在的差异数据
insert into tableB
(id,name)
select id,name
from tableA
where not exists (select * from tableB
where tableB .id=tableA.id)