title: After Delete or Update or Insert Refresh Table
body: <p>Does anybody know how I can refresh data in the table after insert, delete and update operations? I have a simple table:</p>
  
  <pre><code>create table EV_JOURNAL (EVENT_TO_TASK_ID NUMBER(3)
  NOT NULL Check(EVENT_TO_TASK_ID&gt;0), EVENT_TIME TIMESTAMP WITH TIME ZONE NOT NULL);
  </code></pre>
  
  <p>// table created
  I found some info about triggers and has written an after insert, delete and update trigger:</p>
  
  <pre><code>    create or replace 
  TRIGGER AFT_INS_UPD_DEL_TRIG
     AFTER Insert or Delete or Update ON EV_JOURNAL   
     For Each Row
    DECLARE 
    BEGIN 
    INSERT INTO EV_JOURNAL(EVENT_TO_TASK_ID,EVENT_TIME)
     VALUES(:NEW.EVENT_TO_TASK_ID, :NEW.EVENT_TIME); 
    END AFT_INS_UPD_DEL_TRIG;
  </code></pre>
  
  <p>But when I'm trying to insert some data to the table, something like this:</p>
  
  <pre><code>Insert into ev_journal (event_time,event_to_task_id) values(systimestamp,2);
  </code></pre>
  
  <p>I have the following errors:
  SQL Error: ORA-04091: table EV_JOURNAL is mutating, trigger/function may not see it;
  ORA-04088: error during execution of trigger;
  Could someone help me in this situation? I need only to refresh table and that's all, but I can't figure out how to do this.</p>
  
  <p>Code from my c# app where I need to use refreshed data from the given table:</p>
  
  <pre><code>public static List&lt;EventTrigger&gt; FillEventTriggerList (List&lt;EventTrigger&gt; list)
          {            
              using (OracleConnection connection = new OracleConnection (connectionString))
              {
                  connection.Open ();
                  string sqlText = "Select * From EV_JOURNAL";
                  OracleCommand command = new OracleCommand (sqlText, connection);
                  OracleDataReader reader = command.ExecuteReader ();
                  while (reader.Read ())
                  {                               
                      list.Add (new EventTrigger (int.Parse(reader [ "EVENT_TO_TASK_ID" ].ToString()),(DateTime)(reader [ "EVENT_TIME" ])));
                  }
              }
              return list;
          } 
  </code></pre>
  
  <p>So, when I let's say delete some rows from EV_JOURNAL, after this Select query I get old data which must be already deleted but it becomes so only after I click refresh table in the database.</p>
  
  <p>Thanks</p>