0

我正在使用 MS SQL Server 2008。现在正在触发我的触发器,从我的主表中删除记录以从我的子表中删除相应的记录。现在我试图在我的主表上触发 truncate 触发器。可能吗?如果是,请帮助我找到解决方案。

4

1 回答 1

0

TRUNCATE TABLE cannot activate a trigger because the operation does not log individual row deletions.

Ref.

Suggest you perform an actual delete, and perform in batches if this was the original reason (i.e. locking) you used TRUNCATE instead of DELETE

于 2012-12-10T05:25:14.447 回答