Technically though if 3 copies of a single row existed you would only delete 1 with that script, hence why I used the 1 to keep instead of 1 to delete
Nope. Take a look at it once again. I delete those tuples who don't satisfy the criteria of having the max ROWID. In any case when duplicate exists, only one row will have the max rowid among all the duplicates. Hence the query. Try running it and you will know.
> Also in large tables that will be much slower
Correlated queries are generally faster as compared to other types of queries. On what basis can you say that the query would be slow ?
Super Moderator
Featured Poster
Reputation Points: 3241
Solved Threads: 719
Failure as a human
Offline 8,873 posts
since Jun 2006