set @cityName='Rotterdam';
select * from city where `Name` = @cityName;
#变量只能处理字符,并不能代替符号或者关键字进行使用
set @cityName1='Rotterdam';
set @cityName2='Zaanstad';
set @cityName3='Zwolle';
select * from city where `Name` in (@cityName1,@cityName2,@cityName3);
浮点数0的处理
set @dx=0.11,@dy=55.5;
select @dx + @dy;#显示结果有很多0
set @result=@dx + @dy;
select @result;#去掉0