sql update 复杂语句的使用

数据库有两张表 build_info 和 build_info2,两张表单的结构是一样的,现在build_info表一个字段shop_money数据出错了,我需要把表2的这个字段数据更新到表一中,但是只需要更新用户test3在该字段的数据是零情况下的数据就可以,请问怎么写sql语句

只需要更新用户test3在该字段的数据是零情况
update build_info set shop_money=(select shop_money from build_info2 where build_info2.xxx=build_info.xxxx)
where build_info.user = build_info2.user and build_info.user = 'test3' and shop_money =0

update build_info set shop_money=(select shop_money from build_info2 where build_info2.xxx=build_info.xxxx)
where build_info2.xxxx

上面的限制条件你自己完善下

上面都提供了,兄弟,加强基础啊!这你都写不出来

update build_info set shop_money=B.shop_money from build_info A inner join build_info2 B on A.XXXID=B.XXXID WHERE
A.user = 'test3' and A.shop_money =0