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 ?
Ed Prochak wrote:
> happyardy_at_gmail.com wrote:
>> DA Morgan wrote: >>> happyardy_at_gmail.com wrote: >> [] >>>> Daniel, >>>> I try to stay away from GOTO. GOTOs are not evils and are helpful >>>> sometimes but still I dont like to use them. I avoid them as much as >>>> possible. >>>> I was trying to find out if SQL has any keyword that is equivalent of >>>> 'continue' in C. C has GOTO too and I have always wanted to avoid that. >>>> thanks >>>> - Ardy >>> In answer to your question ... no there isn't. But also in your >>> situation there is no functional difference between the two. >>> >>> Another option would be this though I don't like it much either: >>> >>> DECLARE >>> break EXCEPTION; >>> BEGIN >>> LOOP >>> BEGIN >>> <your code here> >>> RAISE break; >>> <the rest of your code here> >>> EXCEPTION >>> WHEN break THEN >>> NULL; >>> END; >>> END LOOP; >>> END; >>> >>> -- >>> Daniel A. Morgan >>> University of Washington >>> damorgan_at_x.washington.edu >>> (replace x with u to respond) >>> Puget Sound Oracle Users Group >>> www.psoug.org >> >> Thanks, Daniel.
I think we can put a ribbon around this one. We've a satisfied customer. ;-)
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Thu Aug 10 2006 - 16:14:51 CDT