title: Trigger SQLPLUS
body: <p>I have a table with the columns(id,t1, t2, t3, mark) with types (number, integer, integer, integer, float) respectively
  I wanna insert the values of the student id, test 1 score, test2 score and test 3 score.
  Using a trigger i wanna insert the average of the three test scores in the column 'mark'.</p>
  
  <p>Here's the trigger i wrote but its giving compilation errors.</p>
  
  <pre><code>create or replace trigger trigger_2 before insert on grades
       for each row
  
  declare
  total integer ;
  begin
  total := :NEW.t1 + :NEW.t2 + :NEW.t3    
  :NEW.mark := total/3.0;
  end;
  SQL&gt; /
  
  Warning: Trigger created with compilation errors.`
  </code></pre>