MySQL Forums
Forum List  »  Triggers

What is wrong with this TRIGGER?
Posted by: Alberto Alcázar Martín
Date: February 10, 2016 11:09AM

Hi,
I think this trigger is okey, I rewrote it several times but always came out the same error:
>>#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 '' at line 6<<
(As I changed the trigger the line changed)

This is the trigger:
"
CREATE TRIGGER SEVEN_re_insert
AFTER INSERT ON ps_customer
FOR EACH ROW BEGIN
IF NEW.recargo_eq=1 THEN
INSERT INTO ps_customer_group (id_customer,id_group)
VALUES(NEW.id_customer,4);
END IF;
END;
"

P.S.: of course I've checked examples and reference manuals.

Thank you all, regards.

Options: ReplyQuote


Subject
Views
Written By
Posted
What is wrong with this TRIGGER?
1629
February 10, 2016 11:09AM
762
February 10, 2016 11:34AM


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.