I would like to know which row has fired a trigger on a table.
The reason therefore is that I would like to backup only the changed row to a backup table.
For example I have a table with the fields ID, NAME, ADDRESS, CITY and when one of those fields has updated, deleted or inserted I would make a copy of that row to the backup table, but only that changed row, not the whole table.
Creating a trigger that makes a backup of the complete table is easy but I can’t find a solution to backup only the changed row.
I came to the same solution, hereby the code I used to accomplish the task: