MySQL Forums
Forum List  »  Stored Procedures

Re: exiting a store procedure?
Posted by: Roland Bouman
Date: November 22, 2005 04:04AM

1) yes:


create procedure myProc(param1 int)
main_block: begin
if
param1 is null
then
leave main_block;
end if;
end main_block;

2) yes, you're can declare handler for any SQLSTate or mysql errorcode. And you can name these using a CONDITION declaration see:

http://dev.mysql.com/doc/refman/5.0/en/declare-conditions.html
http://dev.mysql.com/doc/refman/5.0/en/declare-handlers.html

Options: ReplyQuote


Subject
Views
Written By
Posted
2489
November 22, 2005 03:43AM
Re: exiting a store procedure?
1529
November 22, 2005 04:04AM


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.