I receive error ORA-04091 while this trigger is fired:
CREATE OR REPLACE TRIGGER SendNotifications
AFTER UPDATE OF penalty_amount ON Penalites
FOR EACH ROW
DECLARE
phone_no number(9,0);
BEGIN
SELECT PHONE_NUMBER INTO phone_no
FROM ADRESSES
INNER JOIN ORDERS
ON adresses.ID_READER = orders.ID_READER
INNER JOIN PENALITES
ON orders.ID_ORDER = penalites.ID_ORDER
WHERE :new.ISPAID = 'N';
DBMS_OUTPUT.PUT_LINE('Phone numbers where selected.');
END;
/
I guess I should use :new. and :old. but I have no idea how to deal with it. Could you give me any suggestions or starting points?