title: Change values in the same table before or after update trigger (oracle)
body: <p>I have table with 3 fields:</p>
  
  <pre><code>--------------------------------------------------
  | ID | FILE        |          STATUS             |
  --------------------------------------------------
  | 1  | my.exe      |           valid             |
  --------------------------------------------------
  | 2  | my.exe      |           invalid           |
  --------------------------------------------------
  | 3  | my.exe      |           invalid           |
  --------------------------------------------------
  | 4  | my.exe      |           invalid           |
  --------------------------------------------------
  </code></pre>
  
  <p>This are some versions of one file. When I update status to "Valid" for any of them, I need all files with this name to change their status to "Invalid", 
  except one updated:</p>
  
  <pre><code>--------------------------------------------------
  | ID | FILE        |          STATUS             |
  --------------------------------------------------
  | 1  | my.exe      |           invalid           |
  --------------------------------------------------
  | 2  | my.exe      |           invalid           |
  --------------------------------------------------
  | 3  | my.exe      |            valid            |
  --------------------------------------------------
  | 4  | my.exe      |           invalid           |
  --------------------------------------------------
  </code></pre>
  
  <p>I thought that it can be done in before update trigger:</p>
  
  <pre><code>create or replace trigger ChangeValid
    before update
    on mytable 
    for each row
  declare
  
  begin
     update mytable t set t.status = 'ivalid' where t.status = 'valid' and t.file = :new.file;
  
  end ChangeValid;
  </code></pre>
  
  <p>But I kindly get ORA-04091.  Is the way to change values in this table with trigger?</p>