Poiché stai utilizzando SQL Server 2005+, puoi utilizzare CTE per eseguire questa operazione:
;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
Poiché stai utilizzando SQL Server 2005+, puoi utilizzare CTE per eseguire questa operazione:
;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