首页 新闻 会员 周边

请教一个mysql event的问题

0
悬赏园豆:20 [待解决问题]

我在测试,想创建一个event,每5秒插入2条数据,SQL如下: 

CREATE EVENT STAT
ON SCHEDULE EVERY 5 SECOND
enable
DO
begin
insert into a (snum) values(1);
insert into a (snum) values(2);
end

 执行后提示:

[Err] 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 6

 

请问怎么改呢?

hexllo的主页 hexllo | 菜鸟二级 | 园豆:318
提问于:2017-08-20 17:20
< >
分享
所有回答(2)
0

报的是语法错误

ycyzharry | 园豆:25651 (高人七级) | 2017-08-20 22:45

嗯。。可是这样写哪里有错啊,工具的提示看不出来是哪错了,语法看起来也正确

支持(0) 反对(0) hexllo | 园豆:318 (菜鸟二级) | 2017-10-23 14:48
0

mysql错误代码1064表示用户输入的sql语句有语法错误。具体错误位置和内容会在后面的描述中写出,如:

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 '这里是用户输入的SQL语句出错点内容' at line 1
如果想解决这样的错误,需要使用者去参考语法手册和使用规范,并多加练习、应用、体验,才能减少和解决相关错误。

金琥 | 园豆:2605 (老鸟四级) | 2017-08-21 09:06
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册