Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: what is the SQL equivalent of 'continue' and 'break' in C ?
happyardy_at_gmail.com wrote:
> what is the SQL equivalent of 'continue' and 'break' in C ?
>
> like can I do this...
>
>
> for counter in 1..10
> if(something something)
> ( if (something)
> ( if(something)
> then continue;
>
> //Rest of the for loop
>
> end loop;
>
> Would it start the next iteration without processing the rest of the
> loop ?
>
> thanks
> - Ardy
If I understand the question, something like this in PL/SQL
loop
loop
if something then exit; -- continue, i.e. go on with the rest of the main loop end if;
end loop;
if something_else
then
exit; -- break, i.e. get out of the main loop
end if;
end loop; Received on Tue Aug 08 2006 - 09:06:08 CDT