declare
  cursor c1 is select * from employee;
  e employee%rowtype;
begin 
  open c1;
  loop
   fetch c1 into e;
      exit when c1%rowcount>5;
     dbms_output.put_line(e.empno||'     '||e.ename);
   end loop;
end;
/