After I moved back to Europe and Malta in order to set up
operations here, I was approached by a old friend of mine who
wanted to know how to add a
UNIQUE constraint and
remove duplicates on a table, while keeping the newest records.
He had been trying with
ALTER TABLE but ran into
problems as the older values were taken.
So, to help him out, I first solved it based on his original idea, and then figured I would post a small note about the solution here.
So, let’s say we have the following structure . . .
sql01 …[Read more...]