日期:2014-05-17 浏览次数:21065 次
delete tablename t where exists(select 1 from tablename t2 where t.col1=t2.col1 and t.col2=t2.col2 and t.col3=t2.col3 and t.col4>t2.col4)
------解决方案--------------------
delete from ttab a
where a.c4 != (select min(b.c4)
from ttab b
where a.c1 = b.c1
and a.c2 = b.c2
and a.c3 = b.c3);
------解决方案--------------------
--用rowid就米有重复了 delete from tab a where rowid > (select min(rowid) rowid from tab b where ...)