Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: what is the SQL equivalent of 'continue' and 'break' in C ?

Re: what is the SQL equivalent of 'continue' and 'break' in C ?

From: <happyardy_at_gmail.com>
Date: 8 Aug 2006 07:15:38 -0700
Message-ID: <1155046538.360453.30450@n13g2000cwa.googlegroups.com>

Scott wrote:
> 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;
> -- rest of the for loop

>
> end loop;

Scott,
Thanks for that. I'll try it after lunch and see if it works. Will let you know.

Received on Tue Aug 08 2006 - 09:15:38 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US