如何在sql server中获取更新的列名 [英] How to get updated column names in sql server

查看:127
本文介绍了如何在sql server中获取更新的列名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个名为user的表,其中包含Colid,如UnitID,FactoryName,MonetaryLimit,Location,City等



我想做的是



用户更新信息后,我想跟踪用户更新的列。不是更新的行,而是更新的特定行中的确切列。



我创建了一个更新触发器,但它没有给出确切的结果。写查询



谢谢



Dreen

I have a table called user with colums like UnitID, FactoryName,MonetaryLimit,Location,City etc

What I wanted to do is

After a user Updates his information I wanted to track which are the columns that are updated by the user. Not the updated row but the exact columns in a particular row which are updated.

I have created an update trigger, but it not giving the exact result . Write query

thanks

Dreen

推荐答案

您可以使用Sql Server Auditing执行相同操作。请参阅以下链接:

SQL Server审核(数据库引擎) [ ^ ]

在SQL Server 2008中进行审核 [ ^ ]

SQL Server 2008审核简介 [ ^ ]

对MS SQL Server 2008的审核 [ ^ ]





- Amit
You can use Sql Server Auditing to do the same. Refer the links below:
SQL Server Auditing (Database Engine)[^]
Auditing in SQL Server 2008[^]
An Introduction to SQL Server 2008 Audit[^]
Audits on MS SQL Server 2008[^]


--Amit

这篇关于如何在sql server中获取更新的列名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆