当前位置: 代码迷 >> Sql Server >> sql如何连接字段相同但信息无任何相同的3张表
  详细解决方案

sql如何连接字段相同但信息无任何相同的3张表

热度:89   发布时间:2016-04-27 17:14:00.0
sql怎么连接字段相同但信息无任何相同的3张表?
sql怎么连接字段相同但信息无任何相同的3张表?
很急,麻烦哪位高手指教一下
在线等

------解决方案--------------------
select * from
(select 'aa ' a
union all
select 'BB '
union all
select 'cc '
union all
select 'dd '
) b


a
----
aa
BB
cc
dd

(所影响的行数为 4 行)

------解决方案--------------------
select id,title,content from a
union
select id,title,content from b
union
select id,title,content from c

  相关解决方案