MySQL Forums
Forum List  »  Stored Procedures

Re: How do you exit a procedure
Posted by: Peter Brawley
Date: January 05, 2006 12:12PM

You can use IF ... ENDIF, REPEAT ... UNTIL, and/or WHILE, eg...

DELIMITER |
CREATE PROCEDURE whileproc()
BEGIN
DECLARE condition INT DEFAULT 1;
WHILE condition DO BEGIN
... code which may set the value of condition ...
END WHILE;
END;
|
DELIMITER ;

Options: ReplyQuote


Subject
Views
Written By
Posted
21203
January 05, 2006 04:38AM
Re: How do you exit a procedure
11268
January 05, 2006 12:12PM
10931
January 06, 2006 01:32PM


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.