I have the following columns created in my SQL Server table :
Log_id
Old_value
New_value
Module [The module for the transaction]
Reference_id [unique id of the record from respective tbl to associate with transaction history]
Transaction [The type of transaction. Can include, INSERT, UPDATE or DELETE]
Transaction_status [Indicates SUCCESS or FAILURE]
Stack_trace [The detailed stack trace of the error]
Modified_on
Modified_by
What would be the best possible and efficient way to insert the relevant data to the above audit table whenever Insert, update or delete happens.
Please advice. Thanks.