create trigger stu_trig
on card
for insert
as
declare @e int
begin
if exists(select @e = s.stuidfrom card as c,student as s,course as u where u.cname = '物理' and c.score = 100 and s.sname = '张三')
update student set stuid = 1 where stuid = @e
end
写了1个,不知道正确与否.另1个须加分!
要求这么高,根本就用不到触发器的