i have a table that somehow got duplicated. i basically want to delete all records that are duplicates, which is defined by a field in my table called SourceId. There shou
delete from table where pk in ( select i2.pk from table i1 inner join table i2 on i1.SourceId = i2.SourceId )
good practice is to start with select * from … and only later replace to delete from …
select * from …
delete from …