MySQL Forums
Forum List  »  Stored Procedures

Re: exit stored procedure - a newbie question
Posted by: Per-Erik Martin
Date: June 16, 2005 08:21AM

Just put a label at BEGIN and use LEAVE:

CREATE PROCEDURE `cwa`.`insertWord`(wordId mediumint(8),status tinyint(1), res INT)

foo:BEGIN

if word is null or word ='' then
set res = -1;
leave foo;
else
...
END

pem, Senior Software Dev., MySQL AB

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: exit stored procedure - a newbie question
12639
June 16, 2005 08:21AM


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.