use Test create table table1( id int primary key identity(1,1), tValue nvarchar(15) not null) insert into table1 values('w322') create table table2( id int primary key identity(1,1), tva nvarchar(20) not null ) insert into table2 values('55') select * from table1select * from table2 --更新UPDATE table1SET tValue=t2.tva from table1inner join (select table2.id,table2.tva from table2) t2 on table1.id = t2.id

评论