I'm trying to remove all duplicates in one of my tables. None of them are keys or unique. Tried to google some solutions but they don't seem to work.
delete T1
from MyTable T1, MyTable T2
where T1.MyTableCustomer = T2.MyTableCustomer
and T1.MyTableCustomerId = T2.MyTableCustomerId
and T1.MyTableSoldToParty = T2.MyTableSoldToParty
So I want to remove all rows where there already exists an equal row with the exact same value on all of the columns.
How can I archive this in SQL Server (2017)?