求删除Oracle中重复记录的SQL语句 除了UUID不同之外,其余字段都相同,只保留一条,删除其他的 SQL语句怎么写呀 ------最佳解决方案-------------------- delete from tablename where UUID in
( select UUID from tablename where UUID not in
(select min(UUID) UUID from tablename ))
你测试下,应该可以了 ------其他解决方案--------------------
delete from table where rowid in
( select rowid from(
select rowid,
row_number() over(partition by 相同的字段 order by UUID desc) rn
from table where rn>1))