Oracle 查询重复记录的

列子:Select name,num from test where rowid!=(select max(rowid)

         from test b where b.names=test.names and

b.num=test.num);

---------------------------------------

-- 速度优化,前一语句比后一语句的速度快几十倍
select names,dates
from test,b
where test.names = b.names(+) and
      b.names is null and
      b.dates > date('2003-01-01','yyyy-mm-dd');


select names,dates
from test
where names not in ( select names
                       from b
                      where dates > to_date('2003-01-01','yyyy-mm-dd'));

原文地址:https://www.cnblogs.com/xgxhellboy/p/oracl.html