title: Before insert trigger
body: <p>I want to disable in before insert trigger inserting into table when some condition is true</p>
  
  <pre><code> create or replace trigger CHECK_FOR_MAX_ENTRANTS
  before insert on application
  declare
      entrants_count number;
      max_entrants number;
  begin
      select count(*) into entrants_count from application 
      where id_speciality = :new.id_speciality;
  
      select max_students_number into max_entrants from speciality s
      where s.id_speciality = :new.id_speciality;
  
      IF entrants_count &gt;= max_entrants THEN
          **disable this insert**
  end;
  </code></pre>
  
  <p>How can i do this?</p>