Guys,
When i accidentally happen to place an INTO clause in the select query placed in the FOR loop's cursor section, it worked fine! but the variable N always had NULL value in it. I have posted the script and its output below.
Script:
DECLARE
n NUMBER;
BEGIN
FOR i IN
(SELECT dummy INTO n FROM dual
)
LOOP
dbms_output.put_line('n value is '||NVL(TO_CHAR(n),'Null'));
END LOOP i;
END;
Output:
anonymous block completed
n value is Null
Is this a defect in PLSQL or is this functionality meant for something really appropriate?
Thanks,
B