首页 新闻 赞助 找找看

mysql里面的if语句,到底哪里错了

0
[已关闭问题] 关闭于 2013-05-22 19:42

if (2>0) then
insert into test(id) VALUES(2);
ELSE then
insert into test(id)  VALUES(3);
end if;

 

提示:
if (2>0) then
insert into test(id) VALUES(2);
[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 'if (2>0) then
insert into test(id) VALUES(2)' at line 1

拖鞋王子的主页 拖鞋王子 | 初学一级 | 园豆:37
提问于:2013-05-22 18:35
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册