| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: continue in for loop
Anurag Minocha wrote:
> Hi,
> I have a small doubt. Does oracle pl/sql has something like CONTINUE
> for a FOR LOOP like other languages as C++ has. If not how do i do the
> particular in the best possible way
>
> Thanks
> anurag
Do it like this:
declare
cursor c1 is
select col1,
col2
from mytable;
begin
for i in c1 loop
if i.col1 = 'somevalue' then
goto end_of_loop;
end if;
-- put additional processing here as needed
<<end_of_loop>>
null;
You will probably see others who respond to this message saying "never do that - goto's should never be used" - just ignore them. They do not know what they are talking about.
Ken Received on Fri Jul 23 1999 - 07:50:56 CDT
![]() |
![]() |