MySQL Forums
Forum List  »  Triggers

Re: Trigger Error
Posted by: Sultana Jahan Rini
Date: February 28, 2006 01:03AM

hi,
i m facing the same error.
I want to handle error like below through trigger:
I also want to restrict the trigger through when clause. Is it possible??

DELIMITER '//';

CREATE TRIGGER trig_prov
AFTER DELETE ON user
FOR EACH ROW
--WHEN (old.acct_type_id = 2)

BEGIN

DECLARE EXIT HANDLER FOR SQLEXCEPTION SELECT 'Unknown error from trig_prov..';

............

END;
//
DELIMITER ';'//

Options: ReplyQuote


Subject
Views
Written By
Posted
8507
January 12, 2006 09:23PM
3860
January 14, 2006 07:34AM
Re: Trigger Error
3683
February 28, 2006 01:03AM
3779
February 28, 2006 01:36AM
3268
July 21, 2006 08:51AM
2848
July 21, 2006 08:51AM


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.