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
谢谢