Is there a way in which I can remove duplicates in SQL 2005?

Is there a way in which I can remove duplicates in SQL 2005?

Each row as a unique primary ID, however there are duplicate values in other rows. Example,

ID City
1   London
2   London
3   Wales
Mr_ShawAsked:
Who is Participating?
 
RiteshShahConnect With a Mentor Commented:
there are few different ways to do so, few would work in all version of SQL Server and few would work in SQL Server 2005+.

http://www.sqlhub.com/2009/02/sometime-we-require-finding-duplicate.html

0
 
RiteshShahConnect With a Mentor Commented:
with help of windows partitioning function like Row_Number in SQL Server 2005/2008

http://www.sqlhub.com/2009/10/windowing-partition-functions-rank.html
0
 
Mr_ShawAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.