Display salary and ename using cursor
declare
cursor c1 is select * from emp;
e emp %rowtype;
begin
open c1;
loop
fetch c1 into e;
exit when c1 %notfound;
dbms_output.put_line(e.ename || ' ' || e.sal);
end loop;
dbms_output.put_line('No of records fetched ' || c1 %rowcount);
close c1;
end;