set @userName = '赵一博';
select @userName:= '何浩楠';
select @userName '读取到的userName变量值';
set @x=5,@y=7;
select @x / @y as '5/7的结果'
set @dx=0.2,@dy=0.6;
select @dx + @dy;
set @result=(select @dx + @dy);
select @result;
set @cityName1='kabul';
set @cityName2='Qandahar';
set @cityName3='Maastricht';
select * from city where `Name` =@cityName1;
select * from city where `Name` in(@cityName1,@cityName2,@cityName3);
select @cityName;
MySQL变量的声明与使用
最新推荐文章于 2024-08-23 17:47:41 发布