• 找第一层:
SELECT * FROM tourists WHERE json_data->'$.weixinOpenId' = '299485886686868'
或者
SELECT * FROM devices WHERE JSON_EXTRACT(json_data, "$.lcswAccessToken") = '33e5028835bf4d478ed5cd8f8a618ea5'

 

  • 找多层:
SELECT * FROM devices WHERE json_extract(json_extract(json_extract(json_data,"$.lastOperation"),"$.target"),"$.name") = '西门门岗闸机01'

 

 select * from tickets where JSON_CONTAINS(json_data,'"237241772918912"','$.ticketClassificationIds');

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注