日期:2014-05-17 浏览次数:20775 次
select count(*) from A
select count(*) from B
select count(*) from C
Select*,identity(int,1,1) as rn
Into B
From ( Select '项目1' AS p
Union All
select '项目2' Union All
Select '项目3' Union All
select null) as tt
Select p,count(*)
From B
--Where P is not null
Group by p
----------------
项目1 1
项目2 1
项目3 1