获取触发触发器时正在更新或删除的行的列值

编程入门 行业动态 更新时间:2024-10-24 13:26:58
本文介绍了获取触发触发器时正在更新或删除的行的列值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已经编写了用于更新和删除表的触发器. 当我更新记录时,将触发触发器,并且无论列值是已更新还是已删除还是未更新,我都希望获取该行的所有值. 如果我更新一个列的值,我也想获得整行,我将其插入另一张表以进行审计. 如果我不更新任何列值,则不应出于审计目的将该行插入另一张表中. 问候,

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[^]

更多推荐

获取触发触发器时正在更新或删除的行的列值

本文发布于:2023-10-17 10:41:53,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1500668.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:触发器   或删除

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!