MySQL Forums
Forum List  »  Stored Procedures

exit stored procedure - a newbie question
Posted by: nir gallner
Date: June 11, 2005 02:51PM

Hi,

I am writing a stored procedure, and I want to exit the stored procedure some where in the middle if some condition is true. For example:

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

BEGIN

if word is null or word ='' then
set res = -1;

else
...
END
-------------------

I want to exit after assign res = -1. How do I do that? I thought of handlers, but I only found reference to Mysql server errors in connection with handlers and not self generated errors.

Thanks

Options: ReplyQuote


Subject
Views
Written By
Posted
exit stored procedure - a newbie question
27056
June 11, 2005 02:51PM


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.