新网创想网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

mysql8的json操作

insert into myTable (t_id,year,details) values (5,2019,cast('{"haha":[{"u":1,"t":123 }]}' as json))

 SELECT id  FROM myTable where id=4 and json_contains_path(details->'$[*]', 'one','$[*].haha');

 update myTable set details=JSON_ARRAY_APPEND(details,'$[1].haha',cast('{"u":2,"t":999}' as json)) where id=5

标题名称:mysql8的json操作
本文路径:http://www.wjwzjz.com/article/peissd.html
在线咨询
服务热线
服务热线:028-86922220
TOP