update
test1 a
set
a.
name
=(
select
b.
name
from
test2 b
where
a.id=b.id)
where
a.id
in
(
select
id
from
test2);
例如:
update THTF_STATIC_HUAN_RE_ZHAN a set a.HRZ_CODE=(select b.MING_CHENG from THTF_TABLE_AI_TEMP b where a.objectid=b.OBJECTID) where a.objectid in (select objectid from THTF_TABLE_AI_TEMP)