mssql2000 表触发器并发时产生死锁
ALTER TRIGGER [dbo].[T_Update_Bgd]
ON [dbo].[T_AB] for update
AS
BEGIN
if update(BGD)
begin
update c set c.status='Y'
from inserted a,T_C c
where a.YB=c.YW
and isnull(a.BGD,'')<>''
update c set c.qptime=GETDATE()
from inserted a, dbo.T_AB c
where a.bgd=c.bgd
end
end
如何修改这个触发器能够更好的避免死锁?
当然了,可以在程序里一次性写好语句更新,这个不管,只是谈论Trigger
谢谢
ON [dbo].[T_AB] for update
AS
BEGIN
if update(BGD)
begin
update c set c.status='Y'
from inserted a,T_C c
where a.YB=c.YW
and isnull(a.BGD,'')<>''
update c set c.qptime=GETDATE()
from inserted a, dbo.T_AB c
where a.bgd=c.bgd
end
end
如何修改这个触发器能够更好的避免死锁?
当然了,可以在程序里一次性写好语句更新,这个不管,只是谈论Trigger
谢谢
...全文
相关推荐
SqlServer2000触发器
NULL 博文链接:https://lytlove68.iteye.com/blog/677675
利用SQLServer触发器实现表跟踪.pdf
利用SQLServer触发器实现表跟踪.pdf
深入学习SQLServer,毕业设计论文答辩;ER模型,视图,表,存储过程,触发器,事务等的详细介绍
深入学习SQLServer,毕业设计,论文答辩 ER模型,视图,表,存储过程,触发器,事务等的详细介绍
SQLserver2000zs
针对于初学者最好的一本书!!! 大家看看啊 !!
Sqlserver2000精讲(ppt)
SQLserver数据库资料ppt,很不错的


疑难问题
