create trigger trig1 on tablea
for insert
as 
update tableb set count=count+1 from inserted where tableb.id=inserted.id

解决方案 »

  1.   

    create trigger yourTriggerName on A
    For Insert
    As
        Update B set count = count +1 from B 
              join Inserted on B.yourKeyValue = Inserted.yourkeyValue
      

  2.   


     update b set count= count+ 1
     from inserted where a.=b.
      

  3.   

    CREATE TRIGGER 名1 ON 表a
    FOR INSERT
    AS
    update 表b set 字段count=字段count+1 where 主键 in (select 主键 from inserted)
      

  4.   

    CREATE TRIGGER 名1 ON 表a
    FOR INSERT
    AS
    update 表b set 字段count=字段count+1 where 主键 in (select 主键 from inserted)
      

  5.   

    update b set count= count+ 1
     from inserted  a where a.=b.