I have a table Product
and another table ProductLog
.
The log table needs to track two columns in the Product
table. Each time there is an insert, update or delete on those columns I need to update the log table.
Do I need to write three separate triggers, or can one trigger handle these operations?
I also need to know the type of operation, for example I will need to know if the entry in the log table was because of insert or delete or update. If any one give me an example that would be great.