title: pl sql error when working with trigger
body: <p>I get an error when working with the following trigger:</p>
  
  <pre><code>create or replace trigger t1
    after insert or update  
       on student_tbl 
    declare
     pragma autonomous_transaction;
      begin
     if inserting then
  
   insert into stud_fees_details(stud_id,fees_balance,total_fees) 
         select stud_id,course_fees,course_fees from student_tbl s,courses_tbl c where s.stud_standard_id=c.course_id;
  
   elsif updating('stud_standard_id') then
  
  insert into stud_fees_details(stud_id,fees_balance,total_fees) 
  select stud_id,course_fees,course_fees from student_tbl s,courses_tbl c where s.stud_standard_id=c.course_id;
  
   end if;
  end;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/6hCqr.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6hCqr.jpg" alt="enter image description here"></a></p>
  
  <p>error is</p>
  
  <blockquote>
    <p>ORA-06519: active autonomous transaction detected and rolled back
    ORA-06512: at "SYSTEM.T1", line 15
    ORA-04088: error during execution of trigger 'SYSTEM.T1'</p>
  </blockquote>