只问耕耘
分类: Oracle
2010-04-14 15:14:12
如何用一条sql语句得到表t1,t2,t3三个表的总条数。
select count(*) from t能得到一个表的条数。如何把sum这个东西用上得出三个表的总条数。如果sum不合适换别的也行。
oracle
select sum(a) from (
select count (*) as a from biao1
union all
select count (*) as a from biao2
union all
select count (*) as a from biao3
)