学生表、课程表,学生课程关系表问题

2024年12月02日 11:25
有2个网友回答
网友(1):

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个须加分!

网友(2):

要求这么高,根本就用不到触发器的