[SQL] Remove duplicate records

Here’s an example of deleting records in postgresql

delete from product c1 using product c2 where c1.id < c2.id and c1.name = c2.name

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *