I have the following table
ID VALUE1 VALUE2
1 aaa bbb
1 aaa bbb
Sadly, my table has no primmary keys and I want to create it. But first I need to delete only the first occurrance of duplicated rows. I don't have any unique identifier, the rows are exactly equal.
I know that I can use something like this if I have an unique identifier:
DELETE FROM
table
WHERE
table.id < table.id
But, what is the best approach to this if I don't have a unique identifier?
My table has 500 million lines, about 100k are duplicated.