Google is a better place to find answers. What you want is Change Data Capture (CDC). Manually written Triggers are not the way to go. Come to this forum when you've wrote some code and get stuck.
Mark all posts that give the desired result the answer. If you only mark the last that gave you clarification because you misread an earlier post others will be confused. Some of us are here to help others and our point to post ratio matters.
Member
130 Points
116 Posts
Creating Audit table in Sql server
Apr 26, 2018 04:54 AM|shallubhalla|LINK
Hi Friends,
My requirement is to make Audit table something like having columns FieldName,oldValue,NewValue,TableName,PK_id ,Action.
I want log of any insert/Update in multiple table using trigger.
Thanks
Shallu
Contributor
7048 Points
2189 Posts
Re: Creating Audit table in Sql server
Apr 26, 2018 04:57 AM|ryanbesko|LINK
Google is a better place to find answers. What you want is Change Data Capture (CDC). Manually written Triggers are not the way to go. Come to this forum when you've wrote some code and get stuck.
https://www.google.com/search?q=sql+server+cdc&ie=utf-8&oe=utf-8&client=firefox-b-1
EDIT: You also put this in the Oracle, MySQL, Sybase, Informix and other databases forum. There is a separate forum for SQL Server.
https://forums.asp.net/1226.aspx/1?SQL+Server+SQL+Server+Express+and+SQL+Compact+Edition