ORA-04091: table name is mutating, trigger/function may not see it
<p>I have trigger like this:</p>

<pre><code>CREATE OR REPLACE TRIGGER orders_after_insert
AFTER INSERT
   ON orders
   FOR EACH ROW

DECLARE
   v_type number;

BEGIN
   SELECT type
   INTO v_type
   FROM orders
   WHERE id = :new.parent_id;

   -- do sth with v_type
END;
</code></pre>

<p>I receive an error message as follows:</p>

<blockquote>
  <p>ORA-04091: table name is mutating, trigger/function may not see it</p>
</blockquote>

<p>I don't update any rows in <em>orders</em> table, so is any workaround for this?
I need only select type of row representing parent of new record and use this value in update of another table.</p>