Save Log of operations in the bank with system user field



I would like to know how to by means of triggers in the database I can besides save the operations performed and in which table also performed the user logged in the system (not the user of the bank, if the user of the system) at the moment of the change.

In this case I would have: [User table] [Product table] [Log table]

Any changes made to the user or product table should generate a row in the log table, with:

date, operation (I, U, D), table, user (user table), modified log id.

Thanks for the feedback.

asked by anonymous 14.06.2016 / 17:29

1 answer


For triggers as far as I know you would have to create one for each table. depending on the system you'd better do some method that all running in the database send the record to the LOG table

14.06.2016 / 18:19