SELECT count(*) FROM A a,B b,C c WHERE A.YEAR>=2002 or B.YEAR>=2002 or C.YEAR>2002
你再试试对不对?

解决方案 »

  1.   

    select distinct ((select count(*) from a where a.year>2002) + (select count(*) from b where b.year>2002)+ (select count(*) from b where b.year>2002)) as 11 from a
      

  2.   

    (select 1 from a where a.year>2002) union (select 1 from b where b.year>2002) union (select 1 from b where b.year>2002)
      

  3.   

    tryselect sum(t) from ((select count(*) as t from a where a.year>2002) union (select count(*) as t from b where b.year>2002) union (select count(*)  as t from b where b.year>2002))
      

  4.   

    如果是mysql它没有子查寻该如何?
      

  5.   

    三个表可能会出问题吧,
    因为这样好像默认是left join的说……