17,377
社区成员
发帖
与我相关
我的任务
分享
--这样试试看
update T1
set T1.A列=
(select T2.A列 from T2 where T2.B列=T1.A列)
where exists(select null from T2 where T2.B列=T1.A列)
--你指的遗漏不明白是什么意思
--如果数据量大,建议还是采用临时表来更新
update T1 set T1.A列=
(select T2.A列 from T2 where T2.B列=T1.A列 and rounum<=1)
where exists(select 1 from T2 where T2.B列=T1.A列 ) --加上这句,避免勿更新一些资料!