Home Forums Article Discussions Article Discussions by Author Discuss content posted by rajeshwari How to eliminate duplicate records from a database table? RE: How to eliminate duplicate records from a database table?
turkbuku
Valued Member
Points: 58
More actions
January 6, 2009 at 7:51 am
#921798
with Dups as (
SELECT *,row_number() over(partition by Company_name,Address order by Company_name,Address) as RowNum
FROM dbo.companies)
Delete from Dups where rownum > 1;