当前位置:Gxlcms > 数据库问题 > mysql8的json操作

mysql8的json操作

时间:2021-07-01 10:21:17 帮助过:5人阅读

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操作

标签:sele   pen   sql   insert   set   update   sel   cas   path   

人气教程排行