473,394 Members | 1,697 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

mutating table error by trigger

i have a table with values like 1,2,3.... (primary key)
if i delete a row eg.4,
i need my trigger to update the values 5 to 4,6 to 5, 7 to 6,.. like that, after deleting 4.
pls help me...

my table ABC with QNO as primary key.

my trigger
create or replace trigger t1 after delete on abc
referencing old as orow
for each row
declare
begin
update abc set qno=qno-1 where qno>:orow.qno;
end;
Trigger Created

but when i exec the command
delete abc where qno=3;

i get the error msg
delete qb1 where qno=2
*
ERROR at line 1:
ORA-04091: table RECCSE.ABC is mutating, trigger/function may not see it
ORA-06512: at "RECCSE.T1", line 4
ORA-04088: error during execution of trigger 'RECCSE.T1'
Aug 7 '07 #1
3 1764
debasisdas
8,127 Expert 4TB
Please do not post duplicate threads ,

this has already been replied.
Aug 7 '07 #2
Please do not post duplicate threads ,

this has already been replied.
OK.. thanks.. but can u pls give me a trigger code which need to do me that job..
ie.. to update the values... which will not mutate...
Aug 8 '07 #3
debasisdas
8,127 Expert 4TB
please find the details regarding the problem and the solutions here and here.
Aug 8 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: robert | last post by:
i've found the solution threads on changing a column on insert. works fine. question: - will one package serve for all such triggers, or does there need to be a package defined to support...
4
by: M | last post by:
Hello, I have a very simple table, and want to create a trigger that updates the date column entry (with the current date), whenever a row gets modified. Is there a simple way of fixing this,...
4
by: M Mueller | last post by:
Hello - I'm using Oracle 8i and am running into the infamous mutating table error on an AFTER INSERT OR UPDATE FOR EACH ROW trigger. I have seen examples for getting around mutating table...
0
by: hankr | last post by:
I have only a developer's level knowledge of Oracle, though I have access to DBA tools. Searches through the docs have not been fruitful, so I thought I'd try here. I am getting an error on a...
2
by: Reshmi Jacob | last post by:
Hello, Can any one help me in creating a trigger to update system date into a table while inserting a record into that table. I tried it like this, it is showing error !!! The following error...
0
by: AYAN MUKHERJEE | last post by:
I have 2 tables. 1) emp_test, 2) newemp_test. I had created a trigger to insert automatic data in the table no. 2 , as soon as a row of information is inserted in table no. 1. The Trigger had been...
2
by: hemalatha natarajan | last post by:
hi, I just created a trigger to avoid inserting the same data into table . If same data is inserted then error msg should be thrown. I created a trigger but when it is executed during insertion it...
1
by: gangulajagan | last post by:
Could any one please explain me what is a Mutating Table Or Mutaing Trigger and how to overcome it? Are both Mutating trigger and Mutating Table one and same? Please Explain me with an example...
16
by: vamsioracle | last post by:
Can Someone help me how to avoid mutating error while using triggers. I work on oracle apps. I created a vacation rule such that responsibility is delegated to other person. These details are...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.