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: Scott <Scott.Mattes_at_gmail.com>
Date: 8 Aug 2006 07:06:08 -0700
Message-ID: <1155045968.087834.19670@b28g2000cwb.googlegroups.com>

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

Original text of this message

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