I want to create a trigger that makes the value of trgr equal to the value of seq+100 on the same row. This is what I did but I keep getting the error "table is mutating, trigger/function may not see it".
CREATE OR REPLACE TRIGGER update_tgr
AFTER INSERT ON challenge FOR EACH ROW
BEGIN
UPDATE challenge
SET trgr = :NEW.seq + 100
WHERE seq = :NEW.seq;
END;
What can I do to fix it?