oracle 查找或删除重复记录的语句

--oracle查找重复记录
select * from  tableA  a where a.rowid>=(select min(rowid) from tableA b where a.column=b.column) 

--oracle删除重复记录
delete from  tableA  a where a.rowid>=(select min(rowid) from tableB b where a.column=b.column)

--oracle删除重复记录(保留一条)
delete from  tableA  a where a.rowid>(select min(rowid) from tableB b where a.column=b.column)

 

posted on 2015-02-05 12:03  博客园Jason  阅读(132)  评论(0编辑  收藏  举报

导航