MySQL Forums
Forum List  »  Stored Procedures

Re: Suspend Warnings for Specific Query
Posted by: Roland Bouman
Date: October 11, 2005 04:46AM

You should define a HANDLER for the NOT FOUND condition. Declare that *after* all other declarations:

DECLARE CONTINUE HANDLER FOR NOT FOUND
set appId := 0;

This will assign zero to appId whenever the query yields no records, and continue execution right after the SELECT INTO.

see:

http://dev.mysql.com/doc/mysql/en/conditions-and-handlers.html

and follow both links from there to read all about it.

Options: ReplyQuote


Subject
Views
Written By
Posted
5836
October 10, 2005 06:09PM
Re: Suspend Warnings for Specific Query
2853
October 11, 2005 04:46AM
2372
October 11, 2005 10:07AM


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.