select count(*) from table1 where email in (select email from table2)

解决方案 »

  1.   

    select count(A.email) from table1 A inner join table2 on A.email = B.email
      

  2.   

    select a.email,count(*) from (select a.email from table1 a join table2 b)
      

  3.   

    改:
     select a.email,count(*) from (select a.email from table1 a join table2 b on
    a.email=b.email) as newtable
      

  4.   

    select count(a.email) from t1 where email in (select email from t2)
      

  5.   

    to: hzh2001sz() 你的方法好象不行,它找出的行比所有记录的条数还多