What is mutating table?

Answer Posted / koteswara reddy

If row level trigger based on a table than trigger body cannot read data from same table and also we can't perform dml operations on a same table. if anybody trying this then oracle server returns an error. this error is called mutating error and table is called mutating table
ex:-
create or replace trigger trg
after delete on emp
for each row
declare
l_count number;
begin
select count(*) into l_count from emp;
dbms_output.put_line(l_count);
end;
/

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the cause of mutating table error and how can we solve it?

782


what is blob? : Sql dba

736


Why do we use sqlite?

706


What are the two different parts of the pl/sql packages?

789


Why we use cross join?

701






What is sql server and ase?

711


How do I view a sql trace file?

756


What is use of term?

793


What are the 3 modes of parameter?

862


Explain the difference between drop and truncate commands in sql?

736


How many types of privileges are available in sql?

967


What is on delete set null?

763


What are the two types of cursors in pl sql?

733


What are the types of join and explain each?

771


How do I run sql profiler?

762