三张表的格式都一模一样 如何合并成一张表?

三张表的格式都一模一样 怎么合并成一张表??
三张表的字段格式都一模一样 怎么合并成一张表



a表               b表             c表                                   d表
id   name       id   name     id   name             ?=         id,name




------解决方案--------------------
select * from (
select id,name from a表
union all
select id,name from b表
union all
select id,name from c表)d

------解决方案--------------------

select id,name into D from a表
union
select id,name from b表
union
select id,name from c表

union和union all的区别是一个过滤重复记录一个不过滤重复记录
------解决方案--------------------
--查詢3張表的所有記錄,則用
select * from (
select id,name from a表
union all
select id,name from b表
union all
select id,name from c表)d

--查詢3張表中沒有重復的記錄,則用
select * from (
select id,name from a表
union
select id,name from b表
union
select id,name from c表)d

--union all 比 union 的效率高

------解决方案--------------------
三张表的字段格式都一模一样 怎么合并成一张表



a表 b表 c表 d表
id name id name id name ?= id,name

select * into d from
(
select * from a
union all
select * from b
union all
select * from c
) t