Re: Finding duplicate rows in a table

From: Yves Noel <noel_at_omega.univ-lille1.fr>
Date: 13 Jul 1994 08:54:06 GMT
Message-ID: <300a3e$291_at_netserver.univ-lille1.fr>


In article <CsuKyI.8qy_at_bigtop.dr.att.com>, jameson_at_coupler.drink-eid (131W10000-JamesonJ(DR2483)56) writes:
|>There are several tables in our database that contain duplicate records. Isn't there
|>some simple SQL code to locate duplicate rows in a table? I would really appreciate
|>it if you could post a sample.
|>
|> Thanks,
|>
|> Jeremy Jameson
|>
IT'S IN THE FAQ : select ... from TABLE T
where not T.ROWID = (

           select min(X.ROWID) from TABLE X
           where X.column_name = T.column_name);

This assumes a TABLE table keyed on column_name, which is NOT NULL.        
-- 
Yves NOEL ______________________________________________ C.I.T.I. (batiment M4)
Database Administrator ________________ Universite des Sciences et Technologies
Email: Yves.Noel_at_univ-lille1.fr ________ 59655 Villeneuve d'Ascq Cedex - FRANCE
Voice: (33) 20.33.70.74 _________________________________ Fax: (33) 20.43.66.25

I use ORACLE v6.0.36 on DEC RISC ULTRIX v4.3
___
Received on Wed Jul 13 1994 - 10:54:06 CEST

Original text of this message