Oracle mutating table question
Hello,
For certain condidtion, when a row is inserted into a table, we'd like to automatically (e.g. via trigger) insert a second row into the same table.
Without an autonomoys_transaction directive, we get a mutating table error which we guess is what would be expected.
Below is example code we used for testing this concept. Are there any downsides/gotchas to using autonomous_transaction for this kind of after-insert case? E.g.
CREATE OR REPLACE TRIGGER schema.trigger_operations_after AFTER INSERT ON operations FOR EACH ROW DECLARE PRAGMA AUTONOMOUS_TRANSACTION; BEGIN IF :NEW.servcode = 'IKRB' THEN