title: Oracle PL/SQL Cursor in Trigger
body: <p>I got this trigger, seems to be alright but i got the error : </p>
  
  <p>Trigger :</p>
  
  <pre><code>CREATE OR REPLACE TRIGGER TRG_TABLE_BI
  BEFORE INSERT
  ON TABLE
  FOR EACH ROW
  DECLARE
      CURSOR cur_list IS
          SELECT emp, name, day, salary, id,phone
          FROM TABLE NATURAL JOIN OTHERTABLE
          WHERE emp = :NEW.emp AND name = :NEW.name AND id = :NEW.id;
  
      curChoice cur_list%ROWTYPE;
  
  BEGIN
      OPEN cur_list;
      LOOP
          FETCH cur_list INTO curChoice;
          EXIT WHEN cur_list%NOTFOUND;
          dbms_output.put_line(curchoice.id);
          dbms_output.put_line(curChoice.emp);
          dbms_output.put_line(curchoice.name);
      END LOOP;
      CLOSE cur_list;
  
  END;
  /
  </code></pre>
  
  <p>I got those error : </p>
  
  <pre><code>PLS-00049: bad bind variable 'NEW.emp'
  </code></pre>
  
  <p>If i remove the ':' in the cursor declaration in my WHERE clause, i got a lot more error</p>
  
  <p>Thank you.</p>