Monday 22 April 2013

Write an update trigger on client_master table. The system keep records are being updated. The old values of updated records should be added in the temp table.

Table :
temp
Fields: Client_no, name, operation, o_date, userid

SOLUTION:

CREATE OR REPLACE TRIGGER trg_client_master
BEFORE UPDATE ON client_master
FOR EACH ROW

BEGIN
   INSERT INTO TEMP VALUES(:old.Client_no, :old.name, 'UPDATE', sysdate, UID);
END;
/

No comments:

Post a Comment