sqlserver left join 左连接更新
--左连接查询 select bus.BusinessCode,bus.AcceptanceId,bus.BusAcceptanceTime ,acc.AcceptanceId,acc.AcceptanceTime from TBusiness bus left join TAcceptanceForm acc on bus.AcceptanceId=acc.AcceptanceId where BusinessCode in ('BS000000001','BS000000002','BS000000003'); --左连接更新 update TBusiness set BusAcceptanceTime=acc.AcceptanceTime from TBusiness bus left join TAcceptanceForm acc on bus.AcceptanceId=acc.AcceptanceId where BusinessCode in ('BS000000001','BS000000002','BS000000003');