see below illustrationdeclare @a1 table(id int not null identity(1,1),phone decimal(18,0),adress nvarchar(100))insert @a1(phone,adress)values (111,'new york')insert @a1(phone,adress)values (111,'new york')insert @a1(phone,adress)values (111,'new york')insert @a1(phone,adress)values (222,'maxico')insert @a1(phone,adress)values (222,'mexico')delete tfrom (select row_number() over (partition by phone order by id ) as seq from @a1)twhere seq > 1select * from @a1output----------------------------id phone adress----------------------------1 111 new york4 222 maxico
------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs