--建立测试环境
create table #tb1(ID int, F1 varchar(10), F2 varchar(10))
insert into #tb1
select 1, 'a',null union
select 2, 'b',null union
select 3 , 'c' ,null
create table #tb2(id int,F2 varchar(10))
insert into #tb2
select 1, 'e' union
select 2, 'f'
update #tb1 set F2=t2.F2 from #tb1 t1
inner join #tb2 t2 on t1.id=t2.id
select * from #tb1
drop table #tb1,#tb2
----------------------------
/*
ID F1 F2
1 a e
2 b f
3 c NULL
影响3行
*/