Professional Documents
Culture Documents
Algorithm
Algorithm
Step3:- Declare the columns to store the information which operation we have done on a table and what is the data.
Ex:-
Step4:- Before inserting the values into the columns have to recognize which operation we are performing.
1) If the operation is INSERTING or DELETING then,
Ex:- IF (INSERTING() OR DELETING()) THEN
V_COL_NAME := 'ALL_COLUMNS';
V_NEW_VALUE := :NEW.COLUMN_NAME;
V_OLD_VALUE := :OLD. COLUMN_NAME;
2) If the operation is INSERTING then,
Ex:- IF updating('OBJECT_ID') THEN
V_COL_NAME := 'OBJECT_ID';
V_OLD_VALUE := :OLD. COLUMN_NAME;
V_NEW_VALUE := :NEW. COLUMN_NAME;
V_KEY_VALUE := :OLD. COLUMN_NAME;
Step5:-Create one procedure with params and insert the changed values in a table.
Ex: INSERT INTO table_name (table_col1, table_col2,) values (param1, param2 ,);
Step6:- END;