|
 |
|
ss
Oracle Tips by Burleson |
LOB Trigger Limitations
You can reference object, varray, nested
table, LOB, and REF columns inside triggers, but you cannot modify
their values. Triggers based on actions against these types of
attributes can be created.
Triggers and Mutating Tables
One recurring problem with triggers is when
one tries to reference the table for which it is fired (for example,
to check a date range). This self-referencing results in “ORA-04091
table ‘table_name’ is mutating, trigger/ function may not see it.”
Usually, this situation can be remedied in one of three ways: by
using a temporary PL/SQL table to hold values, by using a temporary
table to hold values, or by using a view. The key here is to remove
the values to be selected against from the table before you attempt
the operation, and then refer to this remote source for any value
checking. It might also be possible to create an index that any
selects will reference. Any solution that moves the data from the
table to a secondary source that can then be used in place of the
table itself should correct this problem.
See Code Depot

www.oracle-script.com |