标签:
UPDATE wkwke.tbTeachingV3 teaching SET teaching.fdSubjectID = (
SELECT fdValue FROM
(SELECT teaching1.id, subtype.fdValue
FROM wkwke.tbTeachingV3 teaching1
LEFT JOIN wkctn.tbContent content
ON teaching1.fdPrepareID=content.id
LEFT JOIN wkctn.tbInteger subtype
ON subtype.fdContentID = content.id
WHERE subtype.fdAttributeID = 36
) newSubject WHERE newSubject.id = teaching.id
)
更新teaching中fdSubjectID为null的老数据
标签:
原文地址:http://www.cnblogs.com/huixuexidezhu/p/5980263.html