Delete duplicate rows in table with no key in SQL Server:
DELETE
FROM TableName
WHERE TableName.%%physloc%%
NOT IN (SELECT MIN(b.%%physloc%%)
FROM TableName b
GROUP BY b.ColumnName)
DELETE
FROM TableName
WHERE TableName.%%physloc%%
NOT IN (SELECT MIN(b.%%physloc%%)
FROM TableName b
GROUP BY b.ColumnName)
No comments:
Post a Comment