title: PL/SQL Error ORA-01403 no data found
body: <p>I'm recieving the ORA-01403 no data found error when trying to insert in a table after creating the following trigger:</p>
  
  <pre><code>CREATE OR REPLACE TRIGGER unic_disc
  BEFORE insert ON disciplina
  FOR EACH ROW
  DECLARE
      CURSOR cursor_professor IS 
      SELECT matricula_professor
      FROM disciplina;
      temp_prof disciplina.matricula_professor%type;
  BEGIN
      OPEN cursor_professor;
      FETCH cursor_professor INTO temp_prof;
      CLOSE cursor_professor;
  END;
  /
  </code></pre>
  
  <p>(the variables are in portugues, but their name does not interfere in the logic.)
  the table creation,</p>
  
  <pre><code>CREATE TABLE disciplina (
      codigo_disciplina NUMBER,
      ementa VARCHAR2(50) NOT NULL,
      conteudo_programatico VARCHAR2(100) NOT NULL,
      matricula_professor NUMBER NOT NULL,
      CONSTRAINT disciplina_pk PRIMARY KEY (codigo_disciplina),
      CONSTRAINT disciplina_matricula_prof_fk FOREIGN KEY (matricula_professor)         REFERENCES professor (matricula_professor)
  );
  </code></pre>
  
  <p>My insert query:</p>
  
  <pre><code>INSERT INTO disciplina (codigo_disciplina,ementa,conteudo_programatico,matricula_professor) VALUES (7,'E6', 'C6',7777);
  </code></pre>
  
  <p>EDIT: I think the error is because I am selecting from the same table I'm editing.</p>