当前位置: 代码迷 >> Web前端 >> orcl 剔除重复的行
  详细解决方案

orcl 剔除重复的行

热度:170   发布时间:2013-09-05 16:02:06.0
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)