本帖最后由 jiangguilong2000 于 2011-03-21 18:05:08 编辑

解决方案 »

  1.   

    SELECT * FROM TB A WHERE NOT EXISTS(SELECT 1 FROM TB B WHERE B.ID>A.ID) GROUP BY A.ONE_ID,A.OTHER_ID
      

  2.   

    delete a from table1 a left join 
    (select one_id,other_id, max(modify_time) as modify_time from table1 group by one_id,other_id) b 
    on a.one_id=b.one_id and a.other_id=b.other_id and a.modify_time=b.modify_time
    where b.one_id is null
      

  3.   

    当您的问题得到解答后请及时结贴.
    http://topic.csdn.net/u/20090501/15/7548d251-aec2-4975-a9bf-ca09a5551ba5.html
    http://topic.csdn.net/u/20100428/09/BC9E0908-F250-42A6-8765-B50A82FE186A.html
    http://topic.csdn.net/u/20100626/09/f35a4763-4b59-49c3-8061-d48fdbc29561.html8、如何给分和结贴?
    http://community.csdn.net/Help/HelpCenter.htm#结帖
      

  4.   

    DELETE a FROM aab a INNER JOIN aab b ON 
     a.one_id=b.one_id and a.other_id=b.other_id and a.modify_time<b.modify_time