If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > mysql error message

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-17-10, 03:37
chester_wang chester_wang is offline
Registered User
 
Join Date: Aug 2010
Posts: 1
mysql error message

CREATE PROCEDURE p2()
BEGIN
DECLARE CONTINUE HANDLER FOR SQLSTATE '23000' SELECT 'Error Code : 1064,primary violation';
INSERT INTO t4 SELECT i.apply_id FROM bms_trans_info i;
select 'haha';
END
$$
This is a simple procedure.i want to complete this thing:
if insert operation fails,i want to show the message that system give,and the operations followed continue.
so what is your suggestion?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On