本文介绍了获取触发触发器时正在更新或删除的行的列值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经编写了用于更新和删除表的触发器. 当我更新记录时,将触发触发器,并且无论列值是已更新还是已删除还是未更新,我都希望获取该行的所有值. 如果我更新一个列的值,我也想获得整行,我将其插入另一张表以进行审计. 如果我不更新任何列值,则不应出于审计目的将该行插入另一张表中. 问候,
Hi, I have written trigger for update and delete for a table. When i update a record the trigger fires and i want to get all the values of the row regardless whether the column value is updated or deleted or not updated. If i update one column value also i want to get entire row which i am inserting into the other table for audit purpose. If i don''t update any column value i should not insert that row into the other table for audit purpose. Regards,
推荐答案看这里: www.seemoredata/zh-CN/showthread.php?134-Example-of-BEFORE-UPDATE-trigger-in-Sql-Server-good-for-Type-2-dimension-table-更新 [ ^ ] Look at this: www.seemoredata/en/showthread.php?134-Example-of-BEFORE-UPDATE-trigger-in-Sql-Server-good-for-Type-2-dimension-table-updates[^]
更多推荐
获取触发触发器时正在更新或删除的行的列值
发布评论