This question has been answered on SO several times : here, here and external links here and here.
I understand the approaches described in above threads and I plan to use this approach.
But I've got few basic doubts in implementing that.
In my case, multiple columns in a row could be updated at the same time, so is following the correct way to implement:
- Find out type of operation (INSERT/UPDATE/DELETE)
- Find out columns which are getting updated
- Read the full row before updating
- Insert one row in Audit table for each column being changed with old and new value (along with other details)
- update the table