注册 登录
编程论坛 MySQL论坛

一个简单的使用IF比较问题

antelope 发布于 2007-05-29 17:31, 1621 次点击

在mysql5.0中运行如下sql语句,为什么不能通过.
set @a=10;
set @b=20;
if @a<@b then
select @a;
end if

但是如果用select if(@a<@b,@a,@b)可以.

0 回复
1