Update table T1
set value1 = ( select value 2 from T2 where T1.ID1= T2.ID2)
where exists ( select 1 from T2 where T1.ID1 = T2.ID2)
这里的 set value 为什么会 update multiple rows ?
thanks a lot
g***l 发帖数: 18555
2
select 1 from T2 where T1.ID1 = T2.ID2 是MULTI RECORDS?
我不知道你这个QUERY到底想实现什么, SET里面的JOIN跟WHERE EXISTS里的没啥关系
,本来应该是很简答的JOIN吧
Update
T1
set
value1 =t2.value2
from
table T1
inner join
table T2 on
(
T1.ID1= T2.ID2
)