我有一个表名User with Availability列,并且具有JSON数据类型MySQL版本7.2。我想选择星期一具有可用性且开始等于3的那些行,我尝试使SQL WHERE可用性->'$。day.monday'=“ Monday”和可用性->'$。day.monday.start'= 3;流动。 但它不起作用。我可以在selectability->'$。day.monday [*]之类的select中选择值。但无法在where子句
中比较值这是可用性字段中的JSON
"day": {
"monday": [
{
"start": "1",
"end": "2",
"type": "remotely"
},
{
"start": "3",
"end": "5",
"type": "inoffice"
}
],
"sunday": [
{
"start": "1",
"end": "2",
"type": "remotely"
},
{
"start": "3",
"end": "5",
"type": "inoffice"
}
]
}