nancy joseph
How to remove duplicate records from a table?
By nancy joseph in SQL Server on May 07 2012
  • Lalit Raghuvanshi
    Feb, 2015 5

    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

    • 0
  • Devesh Omar
    Nov, 2013 14

    DELETE EMP_T FROM (SELECT ROW_NUMBER() OVER PARTATION BY (ID,NAME) ORDER BY ID) AS ROWID FROM EMP) EMP_TWHERE EMP_T.ROWID >1

    • 0
  • Bhilendra Yede
    May, 2012 7

    /* Delete Duplicate records */ WITH CTE (COl1,Col2, DuplicateCount) AS ( SELECT COl1,Col2, ROW_NUMBER() OVER(PARTITION BY COl1,Col2 ORDER BY Col1) AS DuplicateCount FROM DuplicateRcordTable ) DELETE FROM CTE WHERE DuplicateCount > 1 GO

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS