select col from 表 group by col having count(*)>1

解决方案 »

  1.   

    select * from tb 
    where col in(select col from 表 group by col having count(col)>1)
      

  2.   

    select * from table where col in (selct a.col from (select count(*)as c,col from 表 group by col having count(*)>1) a)
      

  3.   

    select 
        重复的字段 
    from 表
    where 重复的字段 in
          (select 
                重复的字段 
           from 表
           group by 重复的字段 
           having count(*)>1
          )
      

  4.   

    select * from tb 
    where col in(select col from 表 group by col having count(col)>1) order by col加一个分组就更好了。谢谢两位大侠,但分数只能给一个人,不好意思。