For the example, Table1 is defined as (id int, address varchar(100))
Will update every value in the table:
create table #test (id int, address varchar(100))
insert into #test (id, address)
values (5, 'test address')
update Table1
set
address = (select top 1 address from #test)
where exists (select 1 from #test t where id = t.id)
Will only update the entry where id = 5:
create table #test (id2 int, address varchar(100))
insert into #test (id2, address)
values (5, 'test address')
update Table1
set
address = (select top 1 address from #test)
where exists (select 1 from #test t where id = t.id2)
The only difference appears to be that one temp table has an ID that matches the source table and the other does not. Why would that matter? Or is there something more subtle, or more obvious, going on here?