8
我想在MySQL中创建触发器。我运行下面的命令:如何在phpmyadmin中创建MySQL触发器
mysql> delimiter //
mysql> CREATE TRIGGER before_insert_money BEFORE INSERT ON money
-> FOR EACH ROW
-> BEGIN
-> UPDATE accounts SET balance=10.0;
-> END;
-> //
Query OK, 0 rows affected (0.19 sec)
但是,当我在phpMyAdmin上面的SQL运行我得到这个错误:
#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 4
这里有什么错?我如何创建触发器?