PL/SQL block:
DECLARE
cursor aa is
select * from emp1;
aa1 aa%rowtype;
BEGIN
open aa;
if aa%isopen then
loop
fetch aa into aa1;
EXIT when aa%NOTFOUND;
if aa%FOUND then
dbms_output.put_line(aa1.eno || aa1.name);
end if;
end loop;
else
dbms_output.put_line('not open');
end if;
END;
No comments:
Post a Comment