统计表数据

上一篇 / 下一篇  2013-10-08 16:22:18 / 个人分类:oracle

1、一次查询出多个表中的数据量是多少
select count(*) from esp_724 union all select count(*) from esp_726;
 
结果为:
    COUNT(*)
1 2500
2 2500
 
 
2、查询多个表的数据量的总和是多少
select sum(aa) from(select count(*) as aa from esp_724 union all select count(*) as aa from esp_726)
 
结果为:
    SUM(AA)
1 5000

TAG:

 

评分:0

我来说两句

Open Toolbar