select *
from t  a
where (select count(*) from t where 字段=a.字段)>1

解决方案 »

  1.   

    select * from tablename where fieldname in (select fieldname from tablename group by fieldname having count(*)>1)
      

  2.   

    select col1 from tbl group by col1 having count(*) >1
      

  3.   

    select 字段值,count(*) from table group by 字段值 having count(*)>1
      

  4.   

    select *
    from t  a
    where (select count(*) from t where 字段=a.字段)>1
    支持小李铅笔刀的做法,快
      

  5.   

    select * from table where 字段 in (select 字段 from table group by 字段 having count(*)>1)
      

  6.   

    select a.* from table1 a,table1 b
    where a.相同字段=b.相同字段 and a.主键字段<>b.主键字段
      

  7.   

    select 字段 from table group by 字段 having count(*)>1
      

  8.   

    select 字段 from tablename group by 字段 having count(*)>1