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!

removing duplicate rows in table

Status
Not open for further replies.

mikedaruke

Technical User
Mar 14, 2005
199
US
Any way to remove duplicate rows in a database. I have like 225k rows in one table. Well there must be like 30k in duplicate rows. How would I get rid of them? I thought about using distinct and putting the results in a table then just deleting the other table. Any info? Thanks
 
Don't you have a primary key in your table to avoid duplicates ? This should be a better way than cleaning your table every week (or month...).
Btw, the "select distinct from source" redirected to another table (let's call it "temp"), "truncate source" and recopy from "temp" table should work.

Water is not bad as long as it stays out human body ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top