SQL Debugging Records
ORA-01489 result of string concatenation is too long
Update inserted row with trigger
Ref: Stack Overflow
INSERT FAIL ON ORA-04091
1 | -- 1. create table |
and we got:
1 | ORA-04091: table CDT is mutating, trigger/function may not see it |
However, this works:
1 | insert into cdt(a) values(1); |
Explanation
- An insert trigger (both before and after) cannot read the related table.
Solution:
Don’t use triggers. While the object-oriented Oracle provides “methods” that are associated with tables, most savvy PL/SQL developers avoid triggers unless absolutely necessary.
Use autonomous transactions. Autonomous transaction makes it independent from the table that calls the procedure.
1 | CREATE OR REPLACE TRIGGER TRIG_CDT |
SQL Debugging Records
https://blog-cdt1.vercel.app/2022/09/30/SQL-Debugging-Records/