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);
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)