Using Row_Number - SQL Row Iteration to fetch Duplicate record

SQL 2008

How to fetch only list of duplicate memberid rows in a member table ??

Member Table have some duplicate memberid's. This is done on purpose.

Now i need to iterate row by row and fetch all the records which has more than one member id.
chokkaStudentAsked:
Who is Participating?
 
Ken ButtersConnect With a Mentor Commented:
http://blog.sqlauthority.com/2007/07/11/sql-server-count-duplicate-records-rows/

SELECT YourColumn, COUNT(*) TotalCount
FROM YourTable
GROUP BY YourColumn
HAVING COUNT(*) > 1
ORDER BY COUNT(*) DESC
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.