Update column values with new user who changed the data in the current row
I have a table the following structure.
CREATE TABLE FILTERCALENDAR1
( "C_DATE" DATE,
"DAY_OF_WEEK" NUMBER(1,0),
"WEEK_WINDOW" NUMBER(1,0),
"MONTH_WINDOW" NUMBER(1,0),
"YEAR_WINDOW" NUMBER(1,0),
"DATE_YEAR_WINDOW" NUMBER(1,0),
"ONCE_WINDOW" NUMBER(1,0),
"USERNAME" VARCHAR2(25 BYTE),
"LASTUPDATED" DATE
);
Problem:
If a user change the value of any of the columns I want to write his username and sysdate in the "USERNAME" and LASTUPDATED" columns.
*Tried:*
I have tried an update trigger to solve this but I am getting a mutating table error.
Can Any one suggest how can I achieve this.
Regards