Trigger if updating then
Then we will update values of TXN_NUMBER column of bank_transactions table and will observe values of bank_transactions and bank_transactions_audit tables. You will notice, in audit table, the old values are inserted. CREATE TABLE bank_transactions ( TXN_ID number(10) primary key, TXN_NUMBER varchar2(20), PARTY_NAME varchar2(50), TXN_DATE date, CREATED_BY varchar2(20), CREATED_DATE date ); --Creating bank_transactions_audit table. Avoid to use primary or unique constraint on audit table to avoid any constraint violation in insertion of the same row multiple times in case of multiple updates of transaction table.Then we will create “trg_before_update_txn_audit” Trigger on table bank_transactions.In this example we have introduced two restriction on before UPDATE trigger statement.