create trigger trig1 on tablea
for insert
as
update tableb set count=count+1 from inserted where tableb.id=inserted.id
for insert
as
update tableb set count=count+1 from inserted where tableb.id=inserted.id
调试欢乐多
For Insert
As
Update B set count = count +1 from B
join Inserted on B.yourKeyValue = Inserted.yourkeyValue
update b set count= count+ 1
from inserted where a.=b.
FOR INSERT
AS
update 表b set 字段count=字段count+1 where 主键 in (select 主键 from inserted)
FOR INSERT
AS
update 表b set 字段count=字段count+1 where 主键 in (select 主键 from inserted)
from inserted a where a.=b.