MySQL Forums
Forum List  »  Stored Procedures

Re: Error handler not being triggered for multi-table updates
Posted by: Peter Brawley
Date: August 18, 2015 09:03AM

delimiter go
CREATE PROCEDURE handlerdemo()
BEGIN
  DECLARE CONTINUE HANDLER FOR SQLSTATE '23000' select 'hello';
  update t1
  join t2 on t1.s1=t2.s1
  set t1.s1 = t2.s2 ;
END;
go
delimiter ;
call handlerdemo();
+-------+
| hello |
+-------+
| hello |
+-------+
{/code]

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Error handler not being triggered for multi-table updates
696
August 18, 2015 09:03AM


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.