select '表一' t,count(A.id) c from A where ......
union
select '表二' t,count(B.id) c from B where ......
union
select '表三' t,count(C.id) c from C where ......

解决方案 »

  1.   

    select (select count(A.id) from A where ......) + 
           (select count(B.id) from B where ......) +
           (select count(C.id) from C where ......)
    from dual;
      

  2.   

    select (select count(*) from A where ......) + 
           (select count(*) from B where ......) +
           (select count(*) from C where ......)
    from dual;
      

  3.   

    select '表一' t,count(A.id) c from A where ......
    union all
    select '表二' t,count(B.id) c from B where ......
    union  all
    select '表三' t,count(C.id) c from C where ......否则有同样的记录就只显示一个
      

  4.   

    select count(*) from t_3 full outer join (select * from t_1 full outer join t_2 on 1=2) t on 1=2;
      

  5.   

    select A_id.cnt + B_id.cnt + C_id.cnt from 
    (
       select count(A.id) cnt from A where ...... A_id,
       select count(B.id) cnt from B where ...... B_id,
       select count(C.id) cnt from C where ...... C_id
    )或者select sum(cnt) from
    (
        select count(A.id) cnt cnt from A where ...... 
        union all
        select count(B.id) cnt cnt from B where ...... 
        union all
        select count(C.id) cnt cnt from C where ...... 
    )
      

  6.   

    select sum(cnt) from
    (
        select count(A.id) cnt cnt from A where ...... 
        union all
        select count(B.id) cnt cnt from B where ...... 
        union all
        select count(C.id) cnt cnt from C where ...... 
    )
      

  7.   

    select sum(cnt) from
    (
        select count(A.id) cnt cnt from A where ...... 
        union all
        select count(B.id) cnt cnt from B where ...... 
        union all
        select count(C.id) cnt cnt from C where ...... 
    )