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
ここで間違って何?トリガーを作成するにはどうすればいいですか?