首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

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

2012-01-14 
sql怎么连接字段相同但信息无任何相同的3张表?sql怎么连接字段相同但信息无任何相同的3张表?很急,麻烦哪位

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

热点排行