mysql用一个表更新另一个表
写法:
UPDATE Document,
ObservationRequest
SET Document.CreateOrganizationName = ObservationRequest.OrganizationName
WHERE
Document.BusinessID = ObservationRequest.ObservationUID;
验证:
SELECT
o.ServiceSectID,
d.Modality
FROM
ObservationRequest o
INNER JOIN Document d ON o.ObservationUID = d.BusinessID
WHERE o.ObservationUID <> d.BusinessID;
积累小的知识,才能成就大的智慧,希望网上少一些复制多一些原创有用的答案