Last active
March 2, 2019 07:56
-
-
Save mvodep/6408eea1d2b0387f8f7726c6fba07bd3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH CTE AS( | |
SELECT [col1], [col2], [col3], [col4], [col5], [col6], [col7], | |
RN = ROW_NUMBER() OVER(PARTITION BY Col1, Col2, ... ORDER BY OrderColumn) | |
FROM dbo.Table1 | |
) | |
DELETE FROM CTE WHERE RN > 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment