json里某个字段更新
update service_cloud SET host_info = JSON_SET( host_info, ‘$.bandwidth‘,2) WHERE service_code = ‘PPP01468648212820‘;
以json里某个字段为查询条件进行查询
select host_info from service_cloud where JSON_EXTRACT(host_info, "$.roomId") = ‘HB‘
也可以写成另一种格式
select host_info from service_cloud where host_info->"$.roomId" = ‘HB‘
原文地址:http://xinnetcodingman.blog.51cto.com/9760903/1866784