I have a after insert trigger on table tbl_campboss_report
, but it is giving me
tbl_campboss_report
is mutating, trigger/function may not see it
this is my trigger:
BEGIN
update tbl_campboss_report c set c.units=(select b.units from tbl_campboss_master b where b.details=:new.details);
END;
Can anyone help me on this?
Thanks in advance
Consider changing the trigger to BEFORE INSERT. You don't need to write UPDATE statement in your trigger. Simply assign the value to the required column.
:new.units = <value that you get from the query>;