标题:在触发器中deleted能不能用 where 啊
只看楼主
yunj1105
Rank: 1
等 级:新手上路
威 望:1
帖 子:757
专家分:0
注 册:2007-2-13
 问题点数:0 回复次数:0 
在触发器中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
搜索更多相关主题的帖子: deleted 触发器 
2007-05-29 14:28



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-143243-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.324703 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved