删除oracle表里的重复记录
转载查找表里的重复记录
select count(*) from table_name where rowid in (select a.rowid from table_name a, table_name b where a.rowid < b.rowid and a.col1=b.col1 and a.col2 = b.col2 and a.col3=b.col3);
删除表里的重复记录
delete from table_name where rowid in (select a.rowid from table_name a, table_name b where a.rowid < b.rowid and a.col1=b.col1 and a.col2 = b.col2 and a.col3=b.col3);
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
oracle删除重复记录
删除表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断,只留有rowid最小的记录 delete from gist
Oracle 面试 SQL 数据库 字段