mutating table.

From: Dave Akin <>
Date: Tue, 11 May 1999 09:31:16 -0700
Message-ID: <LVYZ2.5$>

[Quoted] Within an "after update row " trigger I need to get a count of records with in that table that are associated via a foriegn key. I've tried the following code

select count(*) into x_cnt from table_name where foriegn_key_value = :new.foriegn_key_value.

update referenced_table set table_name_cnt = x_cnt.

I am getting a mutating table error (ora-04091).

this is because I am trying to select from record count from the table the the trigger is on.

can someone suggest a solution? Received on Tue May 11 1999 - 18:31:16 CEST

Original text of this message