How To Create Generic SQL Server Stored Procedure To Perform Inserts Into Audit Table Based on Inserted and Deleted In Trigger
I have implemented an audit trail framework based on the information provided by the first answer to the following post: SQL Server history table - populate through SP or Trigger? Ultimately, the framework that I have implemented uses three triggers per table that insert audit information based on changes to the tables. My insert and delete audit triggers are fairly simple. However, the update triggers are far more complex because the trigger has to check to determine whether or not each column is under audit control and then perform an insert based on whether or not the column values in the