What is the best approach to generate audit trail for transaction table in SQL Server 2005?
What is the relationship (if any) or link (if any) between these tables?
For example:
- I insert a row of data into
sales_detailtable. After that I insert a row intosales_detail_audittable. - Next I made amendment to the same row in
sales_detailtable. I insert the particular record (before amendment) intosales_detail_audittable and then I update thesales_detailtable. - Therefore I have the latest data in the
sales_detailtable and the history of records in thesales_detail_audittable.
Am I doing it right?
Aucun commentaire:
Enregistrer un commentaire