update stu set 总积分=tem2.得分 from(
select stu_id,sum(得分) 得分 from (select stu_id,得分 from writing union all select stu_id,得分 from drawing) tem group by stu_id) tem2
where stu.id=tem2.stu_id
select stu_id,sum(得分) 得分 from (select stu_id,得分 from writing union all select stu_id,得分 from drawing) tem group by stu_id) tem2
where stu.id=tem2.stu_id
(select sum(得分) from drawing where stu_id =stu.stu_id) )