full join在这里没用,只能用union.
select count(*) from (select qybm,xh from a union select qybm,xh from b) ab group by qybm
SELECT qybm,COUNT(1) AS [count] FROM
(SELECT * FROM dbo.a
UNION ALL
SELECT * FROM b) t1
GROUP BY qybm
这样就可以了,,不用full join
select qybm,COUNT(*) as count from (select qybm from a union all select qybm from b) M group by qybm