Closed zauker closed 3 years ago
Remove the DELIMITTER
statements; those are something interpreted by your IDE and the MySQL server has no idea what that means. The SQL to pass to your MySQL server from this module should be the following:
ALTER EVENT myReset
DO
BEGIN
UPDATE `table1` SET `row1` = NULL, `row2` = NULL, `row3` = NULL WHERE `table1`.`timestamp` <= DATE_SUB(now(), INTERVAL 30 MONTH);
UPDATE `table1` SET `row1` = NULL, `row2` = NULL, `row3` = NULL WHERE `table2`.`timestamp` <= DATE_SUB(now(), INTERVAL 30 MONTH);
END
@dougwilson thanks a lot, without the Delimiter instruction it works fine.
I have to perform a query to update a MySQL Event without drop it anche create it again.
this is the query that I try to perform:
but I receive this error message:
The same query works fine if performed on PhpMyAdmin
I'm using mysql Ver 15.1 Distrib 10.4.11-MariaDB, for osx10.10 (x86_64) using EditLine wrapper macOS 10.15.7 node-mysql mysql@2.18.1 node v14.15.1 npm 6.14.9
thanks in advance for any help or suggestion