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

怎样对union all结果统计?该怎么解决

2012-03-01 
怎样对union all结果统计??(表1)unionall(表二)怎么对得到的结果统计,count()怎么使用?[解决办法]select c

怎样对union all结果统计??
(表1)   union   all   (表二)

怎么对得到的结果统计,count()   怎么使用?

[解决办法]
select count(*) from (select .... union all select ...) t
[解决办法]
Select Count(*) From
(
Select * From 表1
Union All
Select * From 表二) A
[解决办法]
select count(*) from (select * from 表1 union all select * from 表2) t

热点排行
Bad Request.