Hi, This did not work. Can you please let me know alternatives? Thanks ------Original Message------ From: Jonathan Lewis To: raju raju To: oracle-l@xxxxxxxxxxxxx Subject: RE: Logical duplicates Sent: Jun 28, 2013 1:50 PM Do you care how long it takes, and which one of the two routes is deleted. If not a simple solution would be: delete from routes r1 where r1.dest1 < r1.dest2 and exists ( select null from routes r2 where r2.dest1 = r1.dest2 and r2.dest2 = r1.dest1 ) ; The first predicate ensures that you don't consider both (New York, Paris) and (Paris, New York) The second predicate checks for the existence of the same route in reverse order I think I'd expect to see a hash anti-join for this - though if it's the wrong version of Oracle and your destinations are not declared NOT NULL then the optimizer might do something nasty. Regards Jonathan Lewis ________________________________________ From: oracle-l-bounce@xxxxxxxxxxxxx [oracle-l-bounce@xxxxxxxxxxxxx] on behalf of rajugaru.vij@xxxxxxxxx [rajugaru.vij@xxxxxxxxx] Sent: 28 June 2013 09:06 To: oracle-l@xxxxxxxxxxxxx Subject: Logical duplicates Hi, I have a table, called travel, with columns (source,destination,distance) this is something like, New york to paris and distance between them. Logically New York to paris or Paris to New York both are same in distance. But I have two entries for that, I waant to delete all such records. Any suggestions? Thanks Sent on my BlackBerry® from Vodafone-- //www.freelists.org/webpage/oracle-l Sent on my BlackBerry® from Vodafone-- //www.freelists.org/webpage/oracle-l