我有一个json数组
{
"response":[
{
"Rate Lock":"Yes",
"Loan Amount":"1M - 2M",
"Credit Score":"800",
"Pre-Approved":"Yes",
"Mortgage Type":"15 ARM",
"Property Type":"Commercial",
"Forecasted Close Date":"2018-07-12"
}
]
}
在名为“自定义\u响应”的列中
select * from custom_deals_response where json_contains(`custom_response`,'"2018-07-12"')
返回和空集。我做错什么了?
1条答案
按热度按时间xpszyzbs1#
json包含3个参数(target column、candidate、path(可选))。在你的数据结构中你的目标搜索列的位置在里面
response
物体。你必须设置3个参数到mysql必须搜索的特定路径。文件参考json\u包含(target,candidate[,path])