I am trying to create a trigger which counts the date of a service and the ID of a branch. The objective of the trigger is to count the number of branch ID as well as the date of service. If the count is greater than 3 then the trigger should come in effect. The issue that I am having however is that oracle has identified that it is a mutating trigger and does not allow the insertion of the data with the error message:
ORA-04091: table user1.SERVICEIH is mutating, trigger/function may not see it
ORA-06512: at "user1.SERVICE_CHECKIH", line 5
ORA-04088: error during execution of trigger 'user1.SERVICE_CHECKIH'