码迷,mamicode.com
首页 > 其他好文 > 详细

更新teaching中fdSubjectID为null的老数据

时间:2016-10-20 14:16:42      阅读:167      评论:0      收藏:0      [点我收藏+]

标签:

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!