declare r_emp scott.emp%rowtype; cursor cur_emp is select t.* from scott.emp t; begin open cur_emp; loop fetch cur_emp into r_emp; exit when cur_emp%notfound; dbms_output.put_line(r_emp.empno || ' ' || r_emp.sal); end loop; close cur_emp; end;