select icount = (select count(*) from a) + (select count(*) from b) + (select count(*) from c)

解决方案 »

  1.   

    select (select count(distinct 学生表关键列) from a)+
             (select count(distinct 教师表关键列) from b)+
               (select count(distinct 行政领导表关键列) from c)
      

  2.   

    select (select count(*) from A) + (select count(*) from B) + (select count(*) from C) as TotalNumber
      

  3.   

    假设每个表都有一个no字段,每个no对应一个人名
    select distinct count(*) from (
    select no from A union all
    select no from B union all
    select no from C)t
      

  4.   

    我看不用distinct 吧,如果同名字就不好了