Mysql中處理JSON字段


處理json字段,可以用json_extract函數:

select * from (select json_extract(ext_value,'$.high')+0 highx,batch_id from batch_ext_1 where ext_type=19 ) a where a.highx>15000000000

將json字段中的String值轉為數字型,可以用+0操作,比如上面語句中

json_extract(ext_value,'$.high')+0 highx

最終會變成數字型。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM