json数组是这样的:
[
{"name":"a","score":20,"wrongid":[1,2,6,7]},
{"name":"b","score":50,"wrongid":[1,2,3,7]},
{"name":"c","score":40,"wrongid":[1,2,9,17]},
{"name":"d","score":70,"wrongid":[1,2,16,27]},
{"name":"e","score":80,"wrongid":[1,2,10,17]},
{"name":"f","score":50,"wrongid":[1,2,10,17,22,33]},
]
表名student,列名是examInfo
比如,我要获取数组里score为50的wrongID,要怎么获取呢??
我之前写了一条sql:
select examInfo->'$[*].wrongID' from student where examInfo->'$[*].score'=50;
结果查不出来,没数据也没报错,50变成了'50',结果也是一样,没数据。
有大牛知道怎么查吗?请教!!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号