Update 表名
set 字段名=
JSON_ARRAY_INSERT(字段名, '$[数组位置]', CAST('{
"did": "111",
"str": "张三"
}' AS JSON))
where id=记录ID
MYSQL向Json数组中的指定位置插入json对象
最新推荐文章于 2024-05-15 10:46:25 发布
Update 表名
set 字段名=
JSON_ARRAY_INSERT(字段名, '$[数组位置]', CAST('{
"did": "111",
"str": "张三"
}' AS JSON))
where id=记录ID