I’m trying to create a trigger but the error shown after typed DECLARE.
mysql> delimeter //
-> CREATE TRIGGER a_b
-> BEFORE UPDATE ON a
-> FOR EACH ROW
-> BEGIN
-> DECLARE cur_date DATE;
ERROR 1064 (42000): 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 ‘delimeter //
CREATE TRIGGER a_b
BEFORE UPDATE ON a
FOR EACH ROW
B’ at line 1
mysql>
The correct word is DELIMITER. Besides that, use TOAD for MySQL or AquaData Studio for comfortable database development