Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: loop
Stjepan Brbot wrote:
>
> What is better:
>
> FOR xy IN curXY LOOP
> ...
> END LOOP;
>
> or
>
> OPEN curXY;
> LOOP
> FETCH curXY INTO xy;
> IF curXY%NOTFOUND THEN
> EXIT;
> END IF;
> ...
> END LOOP;
>
> --
>
> Stjepan Brbot
The first because
If you don't need any cursor attributes through the loop, you can also code
for i in ( select ...
from ... ) loop
...
end loop;
hth
connor
-- ============================== Connor McDonald http://www.oracledba.co.uk "Some days you're the pigeon, some days you're the statue..."Received on Sat Aug 03 2002 - 04:24:52 CDT
![]() |
![]() |