JSON数据字段:
{"DY_houseCheck":[1],"DY_carCheck":[1],"DY_carTypeCheck":[1],"DY_house":["有"],"DY_car":["无"],"DY_carType":["按揭"]}
查询字段JSON中的属性
select describe_where,JSON_QUERY(describe_where, '$.DY_houseCheck') from product
-
查询结果
结果 - 条件查询 - 数组包含的值
select JSON_QUERY(describe_where, '$.DY_houseCheck') from product WHERE JSON_CONTAINS(JSON_QUERY(describe_where, '$.DY_houseCheck'),'1')
describe_where
字符串数组包含查询
select * from expert where json_contains(describe_where,CONCAT('"',"22",'"'))
网友评论