Trinthlo

Remove Duplicate Records From Table

with tmpTable (EmailAddress, DuplicateRecCount) as (
select EmailAddress, row_number() over (partition by EmailAddress order by EmailAddress)
as DuplicateRecCount
from mailinglist
)
delete from tmpTable
where (DuplicateRecCount > 1)