declare  

n  number;

begin 


-- Implicit cursor is opened , counter i copied the datatype as %rowtype fetch can't be used.

for i in  (select level from dual connect by level < 4 )


loop

 n :=i.level;

  --fetch i into n;-- ORA-06550: line 10, column 9: PLS-00456: item 'I' is not a cursor 

   dbms_output.put_line('n'||n);   

end loop;

end;



Comments

Popular posts from this blog