赞
踩
JSON_VALID(requestbody)
注:requestbody为指定字段
JSON_EXTRACT(requestbody, '$.body')
注:requestbody为指定字段,body为json中的key
JSON_LENGTH()
select * from (
select
*,
CASE
WHEN JSON_VALID(requestbody)
THEN JSON_LENGTH(JSON_EXTRACT(JSON_EXTRACT(JSON_EXTRACT(requestbody, '$.body'), '$.collectInfo'), '$.collectguideInfo') )
ELSE null
END as listSize
from prptable
where REQUESTTYPE = 'REGIST'
and requestbody like '%docCode%'
) jsonStr
where listSize > 1
order by id desc
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。