select * from tablename where colname = 'aaa';
是这个意思么?
说清楚一些

解决方案 »

  1.   

    select id,count(*) from tablename group by id having count(*) > 1
      

  2.   

    SQL> select b.id,b.doctime from (select id,count(*) sumnum from test1 group by i
    d) a,test1 b where a.id=b.id and a.sumnum>1;        ID DOCTIME
    ---------- ---------
             1 01-JUL-02
             1 01-MAY-02
             1 20-AUG-02
             1 01-JUL-02
             1 01-SEP-02Elapsed: 00:00:00.40
      

  3.   

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

  4.   

    最简单的还是用having语句
    luckysxn 和zhengg21说的对
    提问的人是不是只认字数啊?