MySQL Forums
Forum List  »  Stored Procedures

MySQL SIGNAL AND RESIGNAL STATEMENT TO USE ERROR CONDITION IN STORED PROCEDURE
Posted by: ARINDAM BISWAS
Date: October 21, 2014 03:58AM

Does MySQL Server 5.1.73 support Mysql

DELIMITER $$

CREATE PROCEDURE AddOrderItem(in orderNO int)
BEGIN

DECLARE EXIT HANDLER FOR SQLSTATE '01000';
DECLARE EXIT HANDLER FOR SQLSTATE '45000';

IF orderNO = 0 THEN
SIGNAL SQLSTATE '01000';
ELSEIF orderNO = 1 THEN
SIGNAL SQLSTATE '45000'
SET MESSAGE_TEXT = 'orderNO not found in orderhouse table';
END IF;

END $$
DELIMITER ;

Error (while accessing through MySQL Command Line Client)suggests that MySql Signal statement does not support MySQL Server version 5.1.73. What is the solution?
Which version of MySQL Server will support MySQL Signal and Resignal statement in s
Stored Procedure?

Options: ReplyQuote


Subject
Views
Written By
Posted
MySQL SIGNAL AND RESIGNAL STATEMENT TO USE ERROR CONDITION IN STORED PROCEDURE
2964
October 21, 2014 03:58AM


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.