17,088
社区成员
发帖
与我相关
我的任务
分享
UPDATE A A1
SET A1.VALUE = (SELECT A2.VALUE
FROM A A2
WHERE A1.COLUM = A2.COLUM
AND A2.ID = 1)
WHERE A1.ID = 2;
----try
update tb a
set a.value=(select b.value from tb b where a.column=b.column and b.id=1)
where exists (select 1 from tb b where a.column=b.column and b.id=1) and a.id=2
update a t1
set value=
(select value
from a
where column=t1.column
and id=1)
where id=2