Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: PLS/SQL: OK to use EXIT in a cursor FOR LOOP ??
In article <7k4ujo$4qv$1_at_news.netvision.net.il>, Haggai
<haggai_shachar_at_hotmail.com> writes
>I prefer using:
>
>cursor_name.open
>cursor_name.fetch (a);
>while cursor_name%found and cursor_name%rownum < 10 loop
> .
> .
> .
> cursor_name.fetch (a);
>end loop;
>
>cursor_name.close;
>
>I'm not sure about the syntax, but the main idea is to transform your FOR
>loop to WHILE loop. (which you can control the exit condition)
Is this for the 'one-entry one-exit' style of programming, or have you experienced problems with the EXIT WHEN ?
--
Andy Hardy. PGP key available on request