Home Forums Article Discussions Article Discussions by Author Discuss content posted by Peter Petrov Yet Another Deleting Duplicate Records (in-place) RE: Yet Another Deleting Duplicate Records (in-place)
odeddror
SSC Eights!
Points: 883
More actions
January 14, 2009 at 10:01 pm
#927060
Peter,
You can do it with CTE like this
WITH x As (select row_number() over (partition by id1, id2 order by id2) nr FROM MyTab)
delete FROM x where nr > 1
Thanks,
Oded