Interviews2 answers
How to delete duplicate records based on single column from a table?
Akhil Joshi
Posted Oct 4, 2012, 7:38 PM EDT2 Answers
Please refer the article
Remove duplicate records/data from Sql Server database table
http://www.webcodeexpert.com/2013/11/how-to-remove-duplicate-recordsdata.html
Lalit RaghuvanshiPosted Feb 5, 2015, 6:09 AM EST
DELETE FROM table_name
WHERE col_name IN ( SELECT col_name FROM table_name GROUP BY col_name HAVING Count(col_name)>1)
DELETE FROM emp WHERE ename IN (SELECT ename FROM emp GROUP BY ename HAVING Count(ename)>1)
anu jacobPosted Oct 18, 2012, 6:16 PM EDT
