m4sh3d
the occasional developer
Pages
Home
Mulesoft
AgilePoint
PowerShell
Places
Just Photos
Just Food
Tuesday, May 16, 2017
SQL - Remove duplicate rows
Neat query to remove duplicate rows (MSSQL)
Assuming I have a table with auto-increment id
DELETE FROM MyTable
WHERE id NOT IN (SELECT MIN(id) FROM MyTable GROUP BY UniqueCol1, UniqueCol2);
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment