I couldnt obtain the output also couldnt discover the problem.


Table : rent_info(cust_id,date_out,date_due_in,date_returned,fine)

This table is perfect for a magazine rental one. At fiirst while placing I must give cust_id,date_out(date when book is released),date_due_in(that is seven days after problem date). Once the book is came back a trigger can be used to place data into rent_info table.

I must provide the date_came back. In trigger I must calculate the fine that is 10$ for each days passed.

For coming back I authored a process that updates the table and card inserts the return date. A trigger is produced( a row-level trigger that inspections for updations just how much fine will be compensated). So that as a final statement the the calculated fine is up-to-date towards the table.

However , I possibly could create the fine amount however the update statement provided to update the fine provides me with a "table mutating error".

Are you able to please let me know where I went wrong. Sorry because of not posting the code. I couldnt obtain the code from lab. If this post is insufficient I possibly could check it out during my system and publish it here later.


Without code it's a little tricky to guess the way you attempted to resolve this issue, however it seems like you've written an UPDATE statement to update the present row from inside a row-level trigger.

That's impossible. You cannot UPDATE a row that's along the way to be up-to-date.

You are able to update the calculated fine by altering the need for ":new.fine" within the trigger.