Posted By

wh0emPah on 04/02/10


Tagged


Versions (?)

ee


 / Published in: PL/SQL
 

  1. PROCEDURE open_curs
  2. IF NOT c_emp_dept%ISOPEN THEN
  3. OPEN c_emp_dept;
  4. END open_curs;
  5.  
  6. PROCEDURE fetch_rows(p_number IN NUMBER)
  7. FOR r_emp_dept IN c_emp_dept
  8. EXIT WHEN c_emp_dept%rowcount < p_number;
  9. DBMS_OUTPUT.put_line(r_emp_dept.first_name || ' ' || r_emp_dept.last_name || ' ' || r_emp_dept.salary || ' ' || r_emp_dept.name);
  10. END fetch_rows;
  11.  
  12. PROCEDURE close_curs
  13. IF c_emp_dept%ISOPEN THEN
  14. CLOSE c_emp_dept;
  15. END close_curs;
  16. END CURSOR_STATE;

Report this snippet  

You need to login to post a comment.