set @var=1;
if @var>1 then
select * from client;
else
select * from otherTable;
end if;
这是我的mysql查询。你们能指出为什么它显示错误吗?这真的是在吃我的大脑。
显示的错误是
IF @var >1 THEN SELECT *
FROM client;
MySQL said: Documentation
#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 @var>1 then
select * from client' at line 1
快速回答真的很有帮助。