how to remove redundant records
I have a table in MS SQL DB, the data was recorded with redundancy, is there an easy way to remove all but keep only one, for example:
id name age dept
---------------------------
1 alan 20 A
2 william 23 B
2 william 23 B
3 mike 30 C
3 mike 30 C
I want to trim it to: id name age dept
---------------------------
1 alan 20 A
2 william 23 B
3 mike 30 C
what is the easy way to do that? DB running on MS SQL 2005.
Any idea?
michael123
Junior Poster in Training
94 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
Ramy Mahrous
Postaholic
2,196 posts since Aug 2006
Reputation Points: 480
Solved Threads: 276