MySQL Forums
Forum List  »  Stored Procedures

Re: Problems using LOOP..END LOOP, label and LEAVE
Posted by: Andrew Gilfrin
Date: June 30, 2005 04:57AM

I had a discussion (argument) with the moderator of the MySQL document on the subject.

In the docs it make it look like the LABEL statement is optional but in reality you can't use LEAVE without it therefore you can only write infinite loops if you don't use a label.

You can use LEAVE outside of a loop, in the main body of the code. But you need to give the block of code a name.

Andrew Gilfrin
------------------
http://gilfster.blogspot.com
My MySQL related Blog

http://www.mysqldevelopment.com
MySQL Stored Procedure,Trigger, View.... (Just about most things these days) Information

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.