Click here to Skip to main content
12,243,752 members (55,691 online)
Click here to Skip to main content
Articles » Database » Database » SQL Server » Alternatives
Alternatives (1)
Add your own
alternative version

Stats

76.3K views
21 bookmarked
Posted

How to remove duplicate rows in SQL Server 2008 when no key is present

, 20 Feb 2011 CPOL
This tip describes how to delete duplicate rows from a table that doesn't have a key.

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

2 Sep 2011
Ron sikander
Find out the number of duplicates in the table:select count(*), VISTX_ST_FIPS,VISTX_CTY_FIPS,VISTX_TC from TR00.NV_STARTER_INDEXgroup by VISTX_ST_FIPS,VISTX_CTY_FIPS,VISTX_TC having count(*)>1--- Delele them using following statementDELETEFROM TR00.NV_STARTER_INDEXWHERE...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Mika Wendelius
Architect
Finland Finland
No Biography provided

| | Privacy | Terms of Use | Mobile
Web02 | 2.8.160426.1 | Last Updated 20 Feb 2011
Article Copyright 2011 by Mika Wendelius
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid