To write and execute a SQLprogram using triggers.
A trigger is a statement that the system executes automatically as a side effect of a modification to the database.
Create a trigger
If there is a updating in client master table, then enter the modification into -audit client table.
If there is a deletion in client master table, then enter the deletion into audit client -table.
View the audit client table.
Stop the program.
SQL> create or replace trigger auditclient1 after update or delete on clientmaster1 for each row
3 oper varchar(8);
4 clie ntno clientmaster1.clientno %type;
5 name clientmaster1.name %type;
6 baldue clientmaster1.baldue %type;
8 if updating then
10 end if;
11 if deleing then
13 end if;
15 insert into auditclient1 values(clientno,name,baldue,oper,sysdate);
16 end auditclient1;