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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to find duplicate records in MS-SQL

Status
Not open for further replies.

database1

Technical User
May 15, 2000
8
IN
how can i select duplicate rows in a table
 
SELECT First(Customers.CompanyName) AS [CompanyName Field], Count(Customers.CompanyName) AS NumberOfDups<br>FROM Customers<br>GROUP BY Customers.CompanyName<br>HAVING (((Count(Customers.CompanyName))&gt;1));
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top