compound trigger for mutating
922275Apr 15 2013 — edited Apr 16 2013hi guys,
Need you mastery about mutating table.
how can I rewrite sample trigger below, in compound trigger to avoid mutating table?
oracle version:
Oracle Database 11g Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
"CORE 11.1.0.7.0 Production"
TNS for Linux: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production
Table1 has (col1,col2,col3,col4)
Table2 has(col1,col2,col3,col4,col5)
Table3 has(col1,col2,col3,col4,col5)
Table4 has(col1,col2,col3,col4)
Create or replace trigger tble1_after_insert
after insert on tabl1
referencing old as old new as new
for each row
Begin
Insert into table4
( select table1.col1,table1.col2,table2.col3,table3.col4
where table1.col1 = table2.col1 (+)
and table2.col3 = table3.col3(+)
and table.col1 = :new.table1.col1)
End;
Mutating problem will occur on table1, that's why I need to convert the script on compound trigger.
If there will be a better way rather than compound trigger kindly share your ideas.
thank you in advance