谢谢各位用sql语句在同一个表中找出相同的记录

解决方案 »

  1.   

    select a,count(a) from table group by a having count(a)>1
      

  2.   

    select * from tablename where fieldname1 in (select fieldname1 from tablename group by fieldname1 having count(fieldname1 )>2)
    其中*也可以改为fieldname1
      

  3.   

    select a,count(a) from table group by a having count(a)>1 只能查a字段一样的。
      

  4.   

    用sql语句在同一个表中找出相同的记录
    ------------------------------------
    问题不清楚
    @_@
      

  5.   

    select * 
    from  tablename
    where 字段 in(select 字段 FROM TABLENAME  GROUP BY 字段 HAVING COUNT(字段)>1)
    //字段名字可以自己改变
      

  6.   

    select a,count(a) from table group by a having count(a)>1
      

  7.   

    select * from tablename a
    where a.rowid<>(select rowid from tablename b where b.xxx=a.xxx)