--第一种
UPDATE rp
SET RelatedDate = fa.InsertTime ,
UpdateTime = GETDATE()
FROM dbo.t_Finance_RelationPartner AS rp
INNER JOIN dbo.t_Finance_Account_ForXiaoShou AS fa ON rp.PartnerRelegationId = fa.AccountId
WHERE rp.Mark > 0
AND fa.Mark > 0
AND rp.RelatedDate < fa.InsertTime
--第二种
UPDATE t_Finance_RelationPartner
SET RelatedDate = fa.InsertTime ,
UpdateTime = GETDATE()
FROM dbo.t_Finance_Account_ForXiaoShou AS fa
WHERE PartnerRelegationId = fa.AccountId
AND t_Finance_RelationPartner.Mark > 0
AND fa.Mark > 0
AND RelatedDate < fa.InsertTime