在oracle中:
select aa.ca,bb.cb,cab.cab
(select count(*) ca from a) aa,
(select count(*) ca from a) bb,
(seelct Count(*) from
(select * from a
union all
select * from b)) cc
select aa.ca,bb.cb,cab.cab
(select count(*) ca from a) aa,
(select count(*) ca from a) bb,
(seelct Count(*) from
(select * from a
union all
select * from b)) cc
sqlserver中可以么我去试试。谢谢你
select countA,countB,countA+countB
from
(select count(*) countA from tableA) aa,
(select count(*) countB from tableB) bb