Mysql can handle json. To process JSON fields in Mysql, you can use the json_extract function, such as the statement "SELECT * FROM proxy WHERE json_extract(content,"$.method") = "POST";".
Processing JSON fields in Mysql
To process json fields, you can use the json_extract function:
select * from (select json_extract(ext_value,'$.high')+0 highx,batch_id from batch_ext_1 where ext_type=19 ) a where a.highx>15000000000 SELECT * FROM proxy WHERE json_extract(content,"$.method") = "POST";
Convert the String value in the json field to a numeric type. You can use 0 to operate. For example,
json_extract(ext_value,'$.high')+0 highx
in the above statement will eventually become a numeric type.
Recommended tutorial: mysql video tutorial
The above is the detailed content of Can mysql handle json?. For more information, please follow other related articles on the PHP Chinese website!