Connecting Tech Pros Worldwide Help | Site Map

Triggers-Mutating Table

Newbie
 
Join Date: Sep 2007
Posts: 17
#1: Sep 24 '07
I am writing a trigger for delete event of employee table (PK - empno, Mrgid - Self referencing key ) in oracle .In the trigger , i wish to update the rows of the same table which have mgr id equal to the empno being deleted, and set the mgrid=null. The problem coming here is of Mutating table.Is there a simple workaround of this problem?
Thx n regards
amitpatel66's Avatar
Moderator
 
Join Date: Mar 2007
Location: Hyderabad, India
Posts: 2,192
#2: Sep 24 '07

re: Triggers-Mutating Table


Quote:

Originally Posted by mask

I am writing a trigger for delete event of employee table (PK - empno, Mrgid - Self referencing key ) in oracle .In the trigger , i wish to update the rows of the same table which have mgr id equal to the empno being deleted, and set the mgrid=null. The problem coming here is of Mutating table.Is there a simple workaround of this problem?
Thx n regards

Check for avoiding mutating table here
Reply