select * from 表名 where count(user)>1 group by user

解决方案 »

  1.   

    select * from  table where user in (  select max(user) from table 
    where having count(*)>1)
      

  2.   

    select * from  table where user in (  select max(user) from table 
    group by user
     having count(*)>1)
      

  3.   

    select user from (select count(*) num ,user from table group by user) where num >2
      

  4.   

    实在不行
    select count(*) as xh,user into #a from tablenam group by user 
    select a.*
    from tablename a,#a b 
    where a.user=b.user and b.xh>1