EchoAlertcom
IS-IT--Management
Hello.
Do I have this statement correct if I want to delete all but the oldest of duplicate records?
Code:
delete from dbo.customers
where dbo.customers.UID !=
(Select MIN(UID) from dbo.customers adb
where adb.emailaddr = dbo.customers.emailaddr)
Thank you,
Steve