create trigger tri_a_b on b after insert as declare @id int declare @val int select @id = num from inserted; select @val = val from inserted; update a set sumcash = sumcash + @val where a.num = @id go alter trigger tri_a_c on c after insert as declare @id int declare @val int select @id = num from inserted; select @val = f_val from inserted; update a set sumcash = sumcash - @val where a.num = @id go
... 我自己琢磨出来了 不过还是谢谢 ~~~