首页 > 数据库技术 > 详细

mysql8的json操作

时间:2019-08-08 16:41:14      阅读:96      评论:0      收藏:0      [点我收藏+]
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操作

原文:https://blog.51cto.com/kankan/2427723

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!