希望得到的数据结果是:
STUDENT_ID TEL             CLASS_ID
---------- ----------- ------------
         1 31184538        95785
         2 31184538        95785
         3 31978726        95785
         4 31978726        95785
         5 11504545        95785
         6 11504545        95785
         7 11504545        95785

解决方案 »

  1.   

    希望得到的数据结果应该是: 
    STUDENT_ID TEL             CLASS_ID
    ---------- ----------- ------------
             1 31184538        95785
             2 31978726        95785
             3 11504545        95785
    或者
    STUDENT_ID TEL             CLASS_ID
    ---------- ----------- ------------
             1 31184538        95785
             3 31978726        95785
             5 11504545        95785
    sorry,急啊!:(
      

  2.   

    delete from student
    where rowid not in(
    select max(rowid) from student
    group by student_id,tel,class_id);
      

  3.   

    应该从rowid入手!delete from student 
    where 
    student_id in(select student_id from student group by student_id having count(student_id)>1)
    and 
    rowid>(select min(rowid) from student group by student_id having count(student_id)>1)
      

  4.   

    delete from student
    where rowid not in(
    select max(rowid) from student
    group by tel,class_id);
      

  5.   

    大虾,你写的sql语句运行结果如下:
    STUDENT_ID TEL             CLASS_ID
    ---------- ----------- ------------
             1 31184538        95785
             2 31184538        95785
             3 31978726        95785
             4 31978726        95785
             5 11504545        95785
             6 11504545        95785
             7 11504545        95785
    思路对头,非常感谢……
      

  6.   

    to bzszp(SongZip):
    这下对了delete from student
    where rowid not in(
    select max(rowid) from student
    group by tel,class_id);非常感谢大家的帮助,结贴!