我想查询一下,一个表中记录数超过1条的记录都有哪些,我该如何写SQL语句呢?

解决方案 »

  1.   

    select * from tb where rownum>1;
      

  2.   

    rownum>1?这样是 查不出东西来的
      

  3.   

    假设表的关键字为a
    select * from table group by a having count(*)>1
      

  4.   

    select * ,count(*) from  table(查询的表) where count(*) > 1group by  字段1,字段2 ,字段3 ..... (记录里面需要相同的所有字段) 
      

  5.   

    select * ,count(*) from  table(查询的表) where count(*) > 1 group by  字段1,字段2 ,字段3 ..... (表里所有字段) 
      

  6.   

    这个才是对的
    select  t.a, from t group by t.a having count(*)>1
      

  7.   

    应该是查重 ,知道使用 having 那就离成功不远了