Bonjour,
Je dois créer un triggers tres simple:

[cpp]
CREATE TRIGGER queries_Notes BEFORE INSERT ON demandes_conges_temp
FOR EACH ROW BEGIN
UPDATE demandes_conges SET status = NEW.accept , validation_date=NOW() WHERE key_query = NEW.qkey;
END;
[/cpp]


Mais Mysql me renvoit:
Error Code : 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 'UPDATE demandes_conges SET status=NEW.accept , validation_date=NOW() where key_q' at line 4
(0 ms taken)

Error Code : 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
CREATE TRIGGER testref BEFORE INSERT ON test1
FOR EACH ROW BEGIN
END' at line 1
(0 ms taken)

Error Code : 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 'UPDATE demandes_conges SET status = NEW.accept , validation_date=NOW() WHERE key' at line 3
(0 ms taken)

Error Code : 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' at line 1
(0 ms taken)


J'utilise SQL Yog...
Je comprend vraiment pas...
meme les exemples du site MySQL marche pas...
A part les tres basique comme:
[cpp]
mysql> CREATE TRIGGER ins_sum BEFORE INSERT ON account
-> FOR EACH ROW SET @sum = @sum + NEW.amount;
[/cpp]