更新teaching中fdSubjectID为null的老数据
Posted 会学习的猪
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了更新teaching中fdSubjectID为null的老数据相关的知识,希望对你有一定的参考价值。
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的老数据的主要内容,如果未能解决你的问题,请参考以下文章