表名:tb_test
json字段: detailImgs
要取的json中的字段:value
UPDATE tb_test alias
JOIN ( SELECT id, TRIM(BOTH '"' FROM Json_extract (detailImgs, "$[0].value") ) city, TRIM(BOTH '"' FROM Json_extract (detailImgs, "$[1].value") ) county FROM tb_test) AS json ON alias.id = json.idSET alias.city = json.city,alias.county = json.county注:TRIM是去除json中的双引号