Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

In a self-joined table, how to remove ALL records with duplicates

$
0
0
How to remove the rows 6,7, 12,13, 21 and 22?
I intend to remove pair of records with duplicate Col3 and the ID of that record is the same as the OrigID of the other record. My query below deletes only 3 rows instead of 6.

Viewing all articles
Browse latest Browse all 3145

Trending Articles