Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplicates in Primary Key

Status
Not open for further replies.

MisterMan

Technical User
Jun 4, 2002
87
US
Despite my best efforts, apparently my primary key has been corrupted somehow and has duplicate values. There are roughly 6500 different records in this database. Is there any way to find the duplicates without going through line by line?

Thank you!
 
SELECT [PK Field], Count(*) FROM yourTable
GROUP BY [PK Field] HAVING Count(*) > 1

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top