create trigger upd_grade on Reports
for update,insert
as
update Students
set CreditHours=(select sum(CreditHours) from Courses where Cno in(
select Cno from Reports where Reports.Grade>=60 and Reports.Sno in(
select Sno from inserted)))where Students.Sno in(select Sno from inserted)
聚合不应出现在 UPDATE 语句的集合列表中。
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-