schooldb库——utf8字符集——utf8_general_ci排序规则
先创建库,点击查询再去使用下列DQL。
DQL
SET @cityName='Haarlemmermeer';
SELECT * FROM city WHER `Name`=@cityName;
多个结果查询
SET @cityNames='Haaelemmermeer,Breda,willemstad';
SELECT @cityNames;
SELECT * FROM city WHERE `Name` in (@cityNames);
SET @cityName1='Haaelemmermeer';
set @cityName2='Breda';
SET @cityName3='willemstad';
SELECT * FROM city WHERE `Name` IN (@cityName1,@cityName2,@cityName3);