--First create a test tableIF OBJECT_ID('TempDB..#Test','u') IS NOT NULL DROP TABLE #TestCREATE TABLE #Test(Col1 VARCHAR(20),Col2 VARCHAR(20),Col3 VARCHAR(20),Col4 VARCHAR(20),Col5 VARCHAR(20))GO--Then insert the test date, with lines 6 and 7 being dupesINSERT INTO #TestSELECT 'Blue','is','the','first','pair' UNION ALLSELECT 'Orange','is','the','second','pair' UNION ALLSELECT 'Green','is','the','third','pair' UNION ALLSELECT 'Brown','is','the','fourth','pair' UNION ALLSELECT 'Slate','is','the','fifth','pair' UNION ALLSELECT 'Orange','is','the','second','pair' UNION ALLSELECT 'Brown','is','the','fourth','pair'GO--Add an identity column to the table for use in deleting the dupesALTER TABLE #test ADD ID INT IDENTITY(1,1)GO--Check #test firstSELECT * FROM #test--Delete the dupesDELETE t1 FROM #test t1, (--Select the MIN ID of the dupe records. It only stands to reason --these were in the table first SELECT MIN(t1.id)ID ,t1.col1,t1.col2,t1.col3,t1.col4,t1.col5 FROM (--Derived table t1 selects all the dupes, based on the columns you specify --you would need to add any columns you want to look at as being criteria --for dupe records SELECT t1.* FROM #test t1, #test t2 WHERE t1.col1 = t2.col1 AND t1.col2 = t2.col2 AND t1.col3 = t2.col3 AND t1.col4 = t2.col4 AND t1.col5 = t2.col5 AND t1.id <> t2.id ) t1, #test t2 WHERE t1.col1 = t2.col1 AND t1.id <> t2.id GROUP BY t1.col1,t1.col2,t1.col3,t1.col4,t1.col5 ) t2 WHERE t1.col1 = t2.col1 AND t1.col2 = t2.col2 AND t1.col3 = t2.col3 AND t1.col4 = t2.col4 AND t1.col5 = t2.col5 AND t1.id <> t2.id--Check #test after deletionSELECT * FROM #test