把搜索结果写进#temp select * into #temp from tablename where 条件把临时表的结果拷贝进源表 truncate table stable insert into stable select * from #temp 删掉临时表 drop table #temp
用主键来对应更新了,比如主键是“编号”字段 临时表为#temp,原表为A UPDATE A SET A.字段 =... FROM #temp INNER JOIN A ON A.编号 = #temp.编号
select * into #temp from tablename where 条件把临时表的结果拷贝进源表
truncate table stable
insert into stable select * from #temp
删掉临时表
drop table #temp
临时表为#temp,原表为A UPDATE A
SET A.字段 =...
FROM #temp INNER JOIN A ON A.编号 = #temp.编号