Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: EXIT vs EXIT WHEN
A copy of this was sent to gennick_at_worldnet.att.net (Jonathan Gennick)
(if that email address didn't require changing)
On Mon, 11 May 1998 03:40:02 GMT, you wrote:
>PL/SQL allows you to exit a loop using either of the
>following:
>
> EXIT
> EXIT WHEN
>
>Why? I can't think of a single case where plain EXIT is
>superior to EXIT WHEN. So why are both allowed? Was there
>some backwards compatibility issue here? Did early versions
>of PL/SQL not support EXIT WHEN?
>
>
for i in 1 .. 10000
do something
if ( this that or the other thing ) then
do some cleanup exit;
its useful when you want to perform some additional logic upon detecting the fact that you want to exit the loop for example.
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA
http://govt.us.oracle.com/ -- downloadable utilities
Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Mon May 11 1998 - 05:41:19 CDT
![]() |
![]() |