ORACLE删除重复记录方法教程.doc

ORACLE删除重复记录方法经过测试,最高效的一种:(1.5万条数据,大约0.125s) delete from tableName where a.rowid? not? in ( select? MAX(b.rowid)? from tableName b GROUP BY b.字段1, b.字段2,... ) Delete ?from tbl where rowid not in (select max(rowid) from tbl t group by t.col1, t.col2?); Delete ?from tbl where rowid not in (select max(rowid) from tbl t group by t.col1, t.col2?); select * --delete from tmp0722 a where a.rowid not in (select max(b.rowid) form tmp0722 b group by a.字段1, a.字段2,... ) (2)比如现在有一人员表 (表名:peosons) 若想将姓名、身份证号、住址这三个字段完全相同的记录查询出来 select p1.*?? from persons? p1,persons? p2?? where p1.idp2.id??

文档评论(0)

1亿VIP精品文档

相关文档