存在表数据:per_user、per_emp_info
需要将per_emp_info 中的name和post_name更新到per_user表中
mysql数据库
update per_user u
JOIN per_emp_info e on u.emp_info_id = e.id
set u.emp_name = e.name,u.post_name = e.post_name
sqlserver
update per_user
set emp_name = e.name,post_name = e.post_name
from per_user u JOIN per_emp_info e on u.emp_info_id = e.id