>There are other ways to do this. Getting duplicate key values from a table is a simple SQL SELECT statement, and another statement afterwards can be used to delete all but one...
What statement do you use to delete all but one?
I am sometimes a bit afraid that using SQL against a corrupted table would generate wrong results, but if you make sure no index is used, I guess this would work too and I might use this next time.
I don't really see the advantage of this method over the unique index method, expect that maybe you would completely want to get rid of unique indexes. I agree that they are in fact quite useless, and I have used other ways to repair tables without using unique indexes. I just use it in this case because I think it is easy. I wouldn't mind if there were no unique indexes though and I agree that they shouldn't be used normally.
Auke
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only