How can I update other rows in the table which I have trigger update for each row
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: How can I update other rows in the table which I have trigger update for each row

  1. #1
    Join Date
    Jan 2001
    Posts
    9

    Arrow

    I am trying to update rows in a table which has a 'update trigger for each row', in the trigger I have code to update all other rows in the same table, but when it tries to update other rows I get the error.
    ORA-04091: table name is mutating, trigger/function may not see it

  2. #2
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    You will have to have another trigger there - post update STATEMENT LEVEL trigger, which will not cause "mutating table error".

    If in that trigger you have to know which rows have been processed in ROW LEVEL trigger then you must store those rowids somehow during execution of row level trigger. You can create a package and store rowids in packaged PL/SQL table or in 8i you can efficiently use GLOBAL TEMPORARY tables for that.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  3. #3
    Join Date
    Jan 2001
    Posts
    9

    Post

    Thanks Jurij good idea I try that

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width