We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77946c6 commit 47a3598Copy full SHA for 47a3598
sql-queries-11/delete-identical-rows/using-delete-with-self-join.sql
@@ -7,7 +7,7 @@ WHERE
7
DR1.Value3 = DR2.Value3 AND
8
DR1.RecordID > DR2.RecordID;
9
10
--- MS SQL Server / MySQL
+-- MySQL
11
DELETE FROM DR1
12
USING DuplicateRecords DR1
13
JOIN DuplicateRecords DR2 ON
@@ -16,3 +16,11 @@ JOIN DuplicateRecords DR2 ON
16
17
18
19
+-- MS SQL Server
20
+DELETE DR1
21
+FROM DuplicateRecords DR1
22
+JOIN DuplicateRecords DR2
23
+ ON DR1.Value1 = DR2.Value1
24
+ AND DR1.Value2 = DR2.Value2
25
+ AND DR1.Value3 = DR2.Value3
26
+ AND DR1.RecordID > DR2.RecordID;
0 commit comments