我已经在这个问题上工作了几天,并且在论坛之后搜索了论坛。对于格式化这个问题,我想出了相同的答案,但我仍然遇到同样的问题。我希望有人能提供帮助。我在此代码上收到错误 #1064。我知道这与调用学生表有关,我无法修复错误。
UPDATE
s
SET
tot_cred = u.real_cred
FROM
student s
JOIN (
SELECT ID, SUM( credits ) real_cred
FROM takes t
JOIN course c ON t.course_id = c.course_id
WHERE grade <> 'F'
AND grade IS NOT NULL
GROUP BY ID
) u ON s.ID = u.ID