【发布时间】:2019-07-02 12:37:26
【问题描述】:
我希望能够使用json_contains“搜索”不区分大小写
这是 json 示例:
[
{
"title": "foo Bar",
"author": "melaine"
},
{
"title": "incredible",
"author": "steve"
}
]
我尝试了什么:
SELECT json_contains('[{"title":"foo Bar", "authour": "melaine"}, {"title":"foo barius", "authour": "steve"}]', '{"title":"foo bar"}')
预期结果:1
实际结果:0
因为我寻找“foo bar”并且 json 中的值是“foo Bar”,所以我没有找到匹配项。有没有办法让这个大小写不敏感,所以我得到一个匹配?
【问题讨论】: