Ponieważ używasz SQL Server 2005+, możesz to zrobić za pomocą CTE:
;WITH cte AS
(
SELECT ROW_NUMBER() OVER (PARTITION BY Col1, Col2, Col3 ORDER BY (SELECT 0)) RN
FROM yourtable
)
DELETE FROM cte
WHERE RN > 1
Ponieważ używasz SQL Server 2005+, możesz to zrobić za pomocą CTE:
;WITH cte AS
(
SELECT ROW_NUMBER() OVER (PARTITION BY Col1, Col2, Col3 ORDER BY (SELECT 0)) RN
FROM yourtable
)
DELETE FROM cte
WHERE RN > 1