title: How to use COMMIT in Procedure called by trigger
body: <p>I have the below trigger(mytrg) which calls a procedure(myproc) that will update table2 if any insert in table1. I have "COMMIT" statement in the procedure after the data is updated in table2. But when there is an insert in table1, i get the below error.</p>
  
  <pre><code>Error report:
  SQL Error: ORA-04092: cannot COMMIT in a trigger
  ORA-06512: at "myschema.myproc", line 63
  ORA-06512: at "myschema.mytrg", line 2
  ORA-04088: error during execution of trigger 'myschema.mytrg'
  04092. 00000 -  "cannot %s in a trigger"
  *Cause:    A trigger attempted to commit or rollback.
  *Action:   Rewrite the trigger so it does not commit or rollback.
  
  **Trigger:**                                                                                        
  create or replace
  trigger mytrg
  after insert on table1
  for each row
  begin
  myschema.myproc(:new.ID, :new.NAME, :new.TYPE_CODE, :new.LANGUAGE);
  end;
  </code></pre>
  
  <p>Need to know how to commit the update.</p>
  
  <p>Thanks</p>