时间:2021-07-01 10:21:17 帮助过:19人阅读
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‘
mysql 5.7 json类型字段操作
标签:mysql 5.7 json类型字段操作