• Hi ..

    Try this one...

    declare @tab table (id int,name varchar(10))

    insert into @tab (id,name)

    select 1,'Sumit' union all

    select 1,'Sumit' union all

    select 2,'Sumit2' union all

    select 2,'Sumit2'

    select id,name from ( select row_number() over (partition by id,name order by id )as row ,id,name from @tab )as t

    where row= 1