MySQL select where JSON field property has value

后端 未结 2 2156
栀梦
栀梦 2020-12-29 05:26

How to write a basic MySQL query that has a WHERE on a property within a JSON data-type field? I don\'t see basic where clause q for json fields on SO.

Something lik

2条回答
  •  不思量自难忘°
    2020-12-29 06:07

    Use Below query for do WHERE opration with JSON Datatype Feild in mysql

    SELECT meta_data->'$.first_name' meta_data FROM users WHERE INSTR(meta_data->'$.first_name','123') > 0
    

提交回复
热议问题