[+/-]
Conditions may arise during stored program execution that require special handling, such as exiting the current program block or continuing execution. Handlers can be defined for general conditions such as warnings or exceptions, or for specific conditions such as a particular error code. Specific conditions can be assigned names and referred to that way in handlers.
To name a condition, use the
DECLARE ...
CONDITION statement. To declare a handler, use the
DECLARE ...
HANDLER statement. See
Section 13.6.7.1, “DECLARE ...
CONDITION Syntax”, and
Section 13.6.7.2, “DECLARE ...
HANDLER Syntax”.
To raise a condition, use the
SIGNAL statement. To modify
condition information within a condition handler, use
RESIGNAL. See
Section 13.6.7.1, “DECLARE ...
CONDITION Syntax”, and
Section 13.6.7.2, “DECLARE ...
HANDLER Syntax”.
Another statement related to conditions is GET
DIAGNOSTICS. The GET DIAGNOSTICS
statement is not supported until MySQL 5.6.

User Comments
Add your own comment.