--Procedures Exercise:
create or replace procedure Display
is
cursor ABC is
select empno, ename, sal
from emp
where deptno=10;
emp_rec ABC%rowtype;
Begin
Open ABC;
Loop
fetch ABC into emp_rec;
exit when ABC%notfound;
end Loop;
dbms_output.put_line(emp_rec.empno||' '
||emp_rec.ename||' '||emp_rec.sal);
end;
/
When I execute the following code there is only one output shown for deptno=10, while deptno=10 contains 3 records.