DELETE
FROM MyTable
WHERE ID NOT IN
(
SELECT MAX(ID)
FROM MyTable
GROUP BY DuplicateColumn1, DuplicateColumn2, DuplicateColumn3)
Read full article from SQL SERVER – Delete Duplicate Records – Rows | Journey to SQL Authority with Pinal Dave
Read full article from SQL SERVER – Delete Duplicate Records – Rows | Journey to SQL Authority with Pinal Dave
No comments:
Post a Comment