在Cosmos Scope / SQL中如何比较列国家和值忽略大小写的列表。
SELECT * FROM student WHERE student_name IN ("aLpHa", "BetA", "GamMa")
以下查询应该在cosmosdb中工作
select * from json j where LOWER(j.student_name) IN ("alpha", "beta", "gamma")
你也可以有一个UDF
,
执行:
function convertLower(str){
return str .toLowerCase();
}
并用它作为
SELECT * FROM c where udf.lowerConvert(c.student_name) IN ("alpha", "beta", "gamma")
你可以使用lower()
:
SELECT * FROM student WHERE lower(student_name) IN ("alpha", "beta", "gamma")
或者,分别是用户upper()
。