mysql 从json字符串中获取指定的key:

2022-12-16 17:23:48 浏览数 (2)

SELECT SUBSTR(detail,    LOCATE('"email"',detail) LENGTH('"email":"'),    LOCATE('",', detail,LOCATE('"email"',detail))-(LOCATE('"email"',detail) LENGTH('"email":"'))) AS email FROM tb_sync_moka2oa_full_detail where moka_id in ( 62923,    64242,    66971,    67197,    67198,    67304,    74124) and is_delete = 0 order by id desc limit 50  ; 虽然mysql 5.7之后支持 JSON_EXTRACT 了,我测试了下好像不行

0 人点赞