Hello all!
I have seen very wide discussions on this before on the web but I was wondering what your thoughts were.
I have a table where when a record is added, I want to update that row. Sounds simple. But I am getting the nasty error about mutating tables.
Here is a very generic summary.
TABLE_A
Field1 Number
Field2 Text
Insert into Table_A (Field1) Values (1000);
I have a trigger that I want to do the following.
Update Table_A Set Field2 = 'Changed Record' where Field1 = 1000;
That is a very rough design to spare the technical details but I am wondering what I need to do in order to update the same record that caused the trigger. I only want the trigger to fire on insert and not update/delete.
Thanks in advance for your time.
Chris
I have seen very wide discussions on this before on the web but I was wondering what your thoughts were.
I have a table where when a record is added, I want to update that row. Sounds simple. But I am getting the nasty error about mutating tables.
Here is a very generic summary.
TABLE_A
Field1 Number
Field2 Text
Insert into Table_A (Field1) Values (1000);
I have a trigger that I want to do the following.
Update Table_A Set Field2 = 'Changed Record' where Field1 = 1000;
That is a very rough design to spare the technical details but I am wondering what I need to do in order to update the same record that caused the trigger. I only want the trigger to fire on insert and not update/delete.
Thanks in advance for your time.
Chris
Comment