mysql 如何查询Json数据里面的数据
数据表字段 json 数据为 { “lastvalue”: 0, “value”: “363.34”, “status”: “1”, “statusName”: “\u521d\u59cb\u72b6\u6001”, “type_id”: “1242”, “room_ids”: “1880,1881,1882”, “client_ids”: [ “46”, “53”, “54” ], “payStatus”: 1 }
查询语句
SELECT * FROM fa_trade_order
WHERE JSON_SEARCH(json, ‘all’, ‘46’, NULL, ‘$.client_ids’) IS NOT NULL