MySQL语法问题。1064错误。

语句如下

[code="java"]select count(id) t_count from cet6 where word='a';
if t_count> 0 then
update set cet68=2,total=total+2 where word='a';
else
insert into cet6(word,total,cet68) values('a',2,2);
end;[/code]

出现1064错误。
求解
[b]问题补充:[/b]
看看我的MySQL语句就知道我没有使用到关键字了
[b]问题补充:[/b]
[code="java"]select count(id) t_count from cet6 where word='a';

if t_count> 0 then

update cet6 set cet68=2,total=total+2 where word='a';

else

insert into cet6(word,total,cet68) values('a',2,2);

end; [/code]

依旧是1064错误。
sunlightcs 呆会给你分
[b]问题补充:[/b]
http://topic.csdn.net/u/20091023/13/59ca0d42-f404-4801-9cd5-a6de2a0836db.html

大家可以参见这个。。

你的if语句没有结束,最后应该是end if;