--消耗很少
delete from t_dfn_monthdel
where (fshippernumberid,fmonth) in (select fshippernumberid,fmonth
from t_dfn_monthdel
group by fshippernumberid,fmonth
having count(*) > 1)
and rowid not in
(select min(rowid) from t_dfn_monthdel group by fshippernumberid,fmonth having count(*) > 1);
--消耗巨大,不建议使用
delete from deppon009.t_dfn_monthdel mo where rowid >
(select min(mo1.rowid) from deppon009.t_dfn_monthdel mo1
where mo1.fshippernumberid = mo.fshippernumberid
and mo1.fmonth = mo.fmonth
having count(*) > 1
);