
How to remove duplicate row without primary column in SQL table?
Remove duplicate row without primary column in SQL Server
WITH CTE AS (
SELECT
*,
ROW_NUMBER() OVER (PARTITION BY Column1, Column2, Column3 ORDER BY (SELECT NULL)) AS RowNum
FROM YourTable
)
DELETE FROM CTE
WHERE RowNum > 1;