update SC set score=(select avg(SC_2.score)
from SC SC_2
where SC_2.C#=SC.C# )
from Course,Teacher
where Course.C#=SC.C# and Course.T#=Teacher.T# and Teacher.Tname=‘叶平’);
修改为
update sc INNER JOIN (SELECT sc.cid ,AVG(score) score_2
from sc,course,teacher
where sc.cid = course.cid and course.tid = teacher.tid AND tname =‘叶平’
GROUP BY sc.cid) s2
set score= s2.score_2
where sc.cid = s2.cid;