Question:
I am creating a trigger for inserting incremental ID’s in my table. But while creating I am getting below errorAn error occurred while processing a recursive SQL statement (a statement applying to internal dictionary tables).
ORA-00604: error occurred at recursive SQL level 1 ORA-01654: unable to extend index SYS.I_TRIGGERCOL1 by 64 in tablespace SYSTEM
Here is my trigger query.
Answer:
That error sounds pretty bad (I never saw it before) … internal dictionary tables?! What is error code? ORA-xxxxx?Meanwhile, trigger can be simplified to this:
if inserting
; what else could it be, if it fires before insert
? Also, you don’t need select ... into
– use sequence directly. nvl
makes sure you won’t overwrite id
if you provided it.Also, consider using identity column instead, if your database version supports it.
If you have better answer, please add a comment about this, thank you!