得到新表:select * into xx from (
select 列1,列2 from 表1
union all
select 列1,列2 from 表2
) tem插入一个旧表:
insert 目标表 (列1,列2) select 列1,列2 from 表 where xx=1
select 列1,列2 from 表1
union all
select 列1,列2 from 表2
) tem插入一个旧表:
insert 目标表 (列1,列2) select 列1,列2 from 表 where xx=1
select a.A,b.B,c.C from A
join B ..
join c ..
select a.*,b.*,c.* from a,b,c where 条件--纵向合并
----去掉重复数据的合并
select * from a
union
select * from b
union
select * from c----不去掉重复数据的合并
select * from a
union all
select * from b
union all
select * from c