在触发器中deleted能不能用 where 啊
这个触发器不起作用,不知道问题是不是在"where"那use lab
go
create trigger period
on lab_stu_course
for delete
as
declare @a varchar(50)
declare @b int
declare @c int
select @b=Cou_period from deleted where Cou_flag=1
select @c=Cou_period from deleted where Cou_flag=0
update lab_students set cou_bi_period=cou_bi_period-@b where user_ID = @a
update lab_students set cou_xuan_period=cou_xuan_period-@c where user_ID = @a