orcl 删除重复的行

delete from FOODDETAIL t
where t.id in (select   t.id from FOODDETAIL where t.sendtime>=to_date('2013-08-24','yyyy-mm-dd HH24:mi:ss') group by   t.id   having count(t.id) > 1 )
and rowid not in (select min(rowid) from   FOODDETAIL where t.sendtime>=to_date('2013-08-24','yyyy-mm-dd HH24:mi:ss') group by t.id having count(t.id )>1)

posted on 2013-08-29 19:19  you Richer  阅读(224)  评论(0编辑  收藏  举报