select "职工号" from a table1 left join b table2 on table2.不变号 = table1.不变号
职工号在哪个表里面就在把 "职工号" 替换成 tableX.职工号
update b set b.职工号=(select a.职工号 from a where a.不变号=b.不变号)
where exists (select 1 from a where a.不变号=b.不变号)
假如相同字段为Name
SELELCT name FROM A
UNION ALL
SELECT name FROM B,
查出来会有重复的记录,用UNION 的话就没有重复记录