Like this?create table test(id int, name varchar(10))insert into test(id, name)values(1, 'amy')insert into test(id, name)values(1, null)insert into test(id, name)values(1, null)insert into test(id, name)values(2, 'tim')insert into test(id, name)values(2, null)insert into test(id, name)values(2, null)update t1 set t1.name = t2.name from test t1 inner join test t2 on t1.id = t2.id and t1.name is null and t2.name is not nullselect * from test