PROCEDURE P_CURSOR_FEATURES
   IS
cursor cur_dep_emp is
  SELECT   employees.first_name, employees.last_name,
         departments.department_name
    FROM employees, departments
   WHERE (    (departments.department_id = employees.department_id)
          AND (departments.department_name = 'Sales')
         )
  ORDER BY employees.last_name ASC;

   type emp_dep_record_type IS RECORD
     (first_name      employees.first_name%TYPE,
      last_name       employees.last_name%TYPE,
      department_name departments.department_name%TYPE);

   emp_dep_rec emp_dep_record_type;
BEGIN
    open cur_dep_emp;
    for i in 1..5 loop
      fetch cur_dep_emp into emp_dep_rec;
      dbms_output.put_line(emp_dep_rec.first_name || ' ' ||
                           emp_dep_rec.last_name  || ' ' ||
                           emp_dep_rec.department_name);
    end loop;
    close cur_dep_emp;
END; -- Procedure