Click here to Skip to main content
11,806,350 members (67,023 online)
Click here to Skip to main content
Articles » Database » Database » SQL Server » Alternatives
Alternatives (1)

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

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


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...


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


About the Author

Mika Wendelius
Finland Finland
I've been a programmer since mid 80's using languages like assembler, C/C++, PL/I (mainframe environment), pascal, VB (I know, I know, no comments please) and C# and utilizing different techniques and tools.

However I'm specialized in databases and database modeling. Mostly I have used products like Oracle (from version 6), SQL Server (from version 4.2), DB2 and Solid Server (nowadays an IBM product).

For the past 10+ years my main concerns have been dealing with different business processes and how to create software to implement and improve them. At my spare time (what ever that actually means) I'm also teaching and consulting on different areas of database management, development and database oriented software design.

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