MySQL Forums
Forum List  »  Triggers

Re: Prevent Insert With Trigger - How is it done?
Posted by: Frank Yingst
Date: March 08, 2017 01:48PM

Here is the new statement. Same problem. Still inserts the value.

CREATE TRIGGER addressbook_upd_check BEFORE UPDATE ON addressbook
FOR EACH ROW
BEGIN
IF SUBSTRING(NEW.counselName,1,6) = 'Select' THEN
SIGNAL SQLSTATE '45000';
END IF;
END;

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Prevent Insert With Trigger - How is it done?
1862
March 08, 2017 01:48PM


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.