json数据类型 相关知识

https://blog.csdn.net/qq_21187515/article/details/90760337

CREATE TABLE t1 (name varchar(255) , secondary_pitch JSON);
INSERT INTO t1 VALUES('Chris Sale', '["Curveball","Slider"]');
INSERT INTO t1 VALUES('Aldoris Chapman', '[]');

select *,JSON_EXTRACT(secondary_pitch, '$[0]')
from t1
where JSON_EXTRACT(secondary_pitch, '$[0]') is not null

posted on 2022-02-16 21:17  木林coder  阅读(5)  评论(0编辑  收藏  举报

导航