Reputation: 3
My question is as follows:
User name = Admin
Whenever I perform an insert/update/delete operation on a table "a". I need to have a trigger that would insert the username in table "b"
Is that possible?
Upvotes: 0
Views: 98
Reputation: 146199
create or replace trigger audit_a_trg
before insert or update or delete on A
for each row
begin
insert into b values (user);
end;
/
Oracle's online documentation is pretty good. You can read the SQL reference here.
edit
user
is a function which returns the name of the account which issues the DML. Find out more.
Upvotes: 2