22,209
社区成员
发帖
与我相关
我的任务
分享
UPDATE 表2 SET 表2.healthScore = 表1.score*0
FROM 表2 JOIN 表1
ON 表2.studentNo=表1.studentNo
WHERE 表2.studentNo='123456789'
--方法二
UPDATE 表2 SET 表2.healthScore = 表1.score*0
FROM 表2 JOIN 表1
ON 表2.studentNo=表1.studentNo ='123456789'
--没测试哈
update 表2,表1 set 表2.healthScore=表1.score*0
where 表2.studentNo=表1.studentNo and 表2.studentNo='123456789'
更正:--提醒,更新前做好备份。
UPDATE 表2 SET 表2.healthScore = 表1.score*0
from 表2 inner join 表1 on 表2.studentNo=表1.studentNo
where 表2.studentNo='123456789') ;
UPDATE 表2 SET
healthScore = 表1.score*0
FROM 表1
inner join 表2
on 表2.studentNo=表1.studentNo
where 表2.studentNo='123456789';