为什么sql server会为一次更新提供两行输出?

为什么sql server会为一次更新提供两行输出?,sql,sql-server,tsql,Sql,Sql Server,Tsql,我运行了一个查询: update activity set scheduledforuseridy=749 where datecompleted is null and dateexpired is null and scheduledforuseridy=374 and communityidy=12 结果是: (2 row(s) affected) (170 row(s) affected) 我只期望一行输出: (xxx row(s) affected) 为

我运行了一个查询:

  update activity
  set scheduledforuseridy=749
  where datecompleted is null
  and dateexpired is null
  and scheduledforuseridy=374
  and communityidy=12
结果是:

(2 row(s) affected)

(170 row(s) affected)
我只期望一行输出:

(xxx row(s) affected)

为什么有两行输出?

表上应该有一个
update
触发器。这就是为什么一个输出用于UPDATE语句,另一个输出用于触发器。

表上应该有一个
UPDATE
触发器。这就是为什么一个输出用于UPDATE语句,另一个输出用于触发器。

尝试运行:

EXEC sp_helptrigger activity
尝试运行:

EXEC sp_helptrigger activity

桌子上有触发器吗?哇,是的,真的非常感谢你。桌子上有很多触发器吗?哇,是的,真的非常感谢你