- February 13, 2016
The following script will evaluate the table specified @TableName (you provide below), create a new table with {name}_Audit and also create insert, update and delete triggers. In my example my table was Dave_Test in scheme engis.
Here is a screen shot of the end result audit table with the same columns PLUS 2 additional columns to document the action executed against the source table.
Here you can see the created _Audit table and newly created _Trigger_Delete, _Trigger_Insert and _Trigger_Update