I have a doubt in triggers..
Im having a table FIXED_DEPOSIT that has following fields:
FD_NO, Debit_ACNO, DURATION, FD_TYPE, INT_PERIOD, PAYMENT_MODE, Credit_ACNO, DD, RQSTD_DATE, MATURITY_DATE, AMOUNT
and rqstd_date is the sysdate..
i insert all the fields except the sysdate and maturity_date.
sysdate is made default.
To insert the maturitydate,i used the following trigger.,
CREATE OR REPLACE TRIGGER update_mdate
AFTER INSERT OR UPDATE ON FIXED_DEPOSIT
FOR EACH ROW
UPDATE FIXED_DEPOSIT SET maturity_date=(SELECT ADD_MONTHS(sysdate,duration)+1 FROM dual);
I dont know whether it is correct or not ,but it is not showing any error when compiling,
but when executing it is showing the following error,
table fixed_deposit is mutating,trigger/function may not see it
error during the execution of trigger 'update_mdate'
please help me to get rid of this error.