MySQL Forums
Forum List  »  Quality Assurance

Can't Create Trigger in MySQL
Posted by: Pongpop Inkaew
Date: November 06, 2012 09:47PM

I want to create trigger Update ,but this syntax when execute not passed

CREATE TRIGGER tU_adminclient AFTER UPDATE ON adminclient
FOR EACH ROW
BEGIN
IF EXISTS(SELECT basicInfoRefID FROM BasicInforColor WHERE basicInfoRefID= NEW.clid) THEN
UPDATE basicinfocolor
SET basicinfocolorcode = NEW.cl5,
basicinfoName = NEW.clabbre
WHERE basicinfoRefID = NEW.clid;
END IF
END



//[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END'

Options: ReplyQuote


Subject
Views
Written By
Posted
Can't Create Trigger in MySQL
1976
November 06, 2012 09:47PM


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.