I want to have an audit trail, which I could track user activity on a table.
1. Write all data from a data table to audit table.
2. Write changed data from ? to audit table.
Let' s say an audit table look like :
1. Id BigInt
2. ColumnName varchar(max)
3. ColumnValue as varchar(max)
How could I do this ?
Please suggest good schema for the audit table.