如何在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
>