title: Type Creation and Execution
body: <p>I have created a type to print experience of employees from employees table for 5 employees with one incorrect id. I have created an exception to skip it but I am not getting the result for it. What mistake have I done? Please refer my query and tell the error.  </p>
  
  <pre><code>CREATE OR REPLACE TYPE emp_id_typ IS TABLE OF NUMBER;
  /
  
  CREATE OR REPLACE TYPE emp_exp_typ IS TABLE OF NUMBER;
  /
  
  CREATE OR REPLACE PROCEDURE exp_sp ( p_empid   IN  emp_id_typ
                                     , p_exp     OUT emp_exp_typ)
  IS
  v_exp   NUMBER;
  BEGIN
      FOR i IN p_empid.FIRST..p_empid.COUNT
      LOOP
      p_exp.EXTEND;
      SELECT ROUND(MONTHS_BETWEEN(SYSDATE, hire_date)/12) INTO v_exp FROM employees
       WHERE employee_id = p_empid(i);
      p_exp(p_exp.LAST) := v_exp;
      END LOOP;
      EXCEPTION
      WHEN OTHERS THEN
          v_exp := NVL(v_exp, 'NULL');
  END exp_sp;
  /
  
  DECLARE
      v_empid emp_id_typ := emp_id_typ( );
      v_exp   emp_exp_typ := emp_exp_typ( );
  BEGIN
      v_empid := emp_id_typ(101, 102, 52, 100, 206);
      FOR i IN v_empid.FIRST..v_empid.COUNT
      LOOP
      exp_sp(v_empid(i), v_exp(i));
      dbms_output.put_line(v_empid(i), v_exp(i));
      END LOOP;
  END;
  /
  </code></pre>
  
  <p>Thanks in advance...</p>