Remove duplicate rows from a table - independent from indexes

I need to remove duplicate rows from my table. It has an autoincrement integer as primary key and a few other attributes (PROD_ID, RESOURCE_ID, DATE_ADDED). What's the easiest way to do that?

Answer:

Follow these steps:

Create a temporary second table with an identical structure to your table. Run a select statement with the keyword DISTINCT on the desired attributes. That means, leave out the attributes that do not make a row 'unique'.

If you have cascading deletes, constraints or (on delete) triggers defined on your table, then temporarily disable them.

One alleged victim would routinely throw away his underwear to hide [url= http://www.louisvui..net/]Louis Vuitton Bags[/url] the supposed abuse. Week two of the trial began with a final prosecution witness. The mother of Victim No. 9 took the [url= http://www.chanelou..et/]Chanel Purses[/url] stand Monday to detail her son’s cover-up of the alleged sordid acts he suffered at Sandusky’s hands. “I [url= http://www.guccibel..rg/]Hermes Belts[/url] always wondered why he never had any underwear in the laundry,” she testified. “He just told me he had an [url= http://www.beltsout...org/]Mens Belts[/url] accident and he threw them out.” Indeed, she testified that he started becoming “sick” more often after [url= http://www.topbelts..org/]Gucci Belts[/url] spending time with the ex-Penn State coach. Victim No. 9 supposedly slept over at the Sandusky residence more than 100 times.Victim No. 9 testified [url= http://www.louisvui..net/]Louis Vuitton Handbags[/url] last Thursday that he screamed during one episode of alleged abuse, hoping that [url= http://www.beltsonl..com/]Louis Vuitton Belts[/url] Sandusky’s wife, who he said was always upstairs, would hear. “I think the basement is soundproof,” he said [url= http://www.chanels-..om/]Chanel Handbags[/url] tearfully, noting that Sandusky’s wife Dottie never did come down.Lead defense attorney Joe Amendola has also [url= http://www.chanelba..om/]Chanel Handbag[/url] suggested previously that the accusers and the Attorney General’s office might be colluding. Lead prosecutor Joe [url= http://www.lvshopos..net/]Louis Vuitton Purses[/url] McGettigan has often queried the alleged victims while on the stand: “Have I ever, ever, ever told you what to say?” which they’ve answered with resounding denials. But it could be a larger issue for Kline and the other subpoenaed attorneys to defend themselves against a [url= http://www.louisvui..com/]Louis Vuitton Purse[/url]
charge of violating the gag order issued by Judge Cleland, which bars any representative from either side from discussing the case with the media.

Ooh that's a great blog! I am such a big geek. Most of it has to do with me being on the internet, havnig so many places that I frequent on there, as well as how I play video games all day and read science fiction novels and watch the scifi channel.