mysql json

SELECT distinct CAST(JSON_UNQUOTE(attributes_json->’ . C l u s t e r I D ′ ) A S c h a r ) a s o i d F R O M ‘ t c a b l e ‘ w h e r e a t t r i b u t e s j s o n − > ′ .ClusterID') AS char) as oid FROM `t_cable` where attributes_json->' .ClusterID)ASchar)asoidFROMtcablewhereattributesjson>.ClusterID’ > ‘0307000074’;
#select * from t_cable c where [project_code]=‘TOMSerbia’;

SELECT distinct json_keys(attributes_json) as “keys” FROM t_cable;

SELECT distinct CAST(JSON_UNQUOTE(attributes_json->’ . C l u s t e r I D ′ ) A S c h a r ) a s o i d F R O M ‘ t c a b l e ‘ ; S E L E C T d i s t i n c t C A S T ( J S O N U N Q U O T E ( a t t r i b u t e s j s o n − > ′ .ClusterID') AS char) as oid FROM `t_cable`; SELECT distinct CAST(JSON_UNQUOTE(attributes_json->' .ClusterID)ASchar)asoidFROMtcable;SELECTdistinctCAST(JSONUNQUOTE(attributesjson>.ClusterID’) AS char) as oid FROM t_cable where attributes_json->’$.ClusterID’ > ‘0307000074’;

select * from t_cable where attributes_json->’ . E n d I D ′ = ′ 020100005 4 ′ a n d a t t r i b u t e s j s o n − > ′ .EndID' = '0201000054' and attributes_json->' .EndID=0201000054andattributesjson>.ClusterID’ >= ‘0307000064’;
select * from t_cable where attributes_json->’ . E n d I D ′ = ′ 020100005 4 ′ a n d a t t r i b u t e s j s o n − > ′ .EndID' = '0201000054' and attributes_json->' .EndID=0201000054andattributesjson>.ClusterID’ >= ‘0307000064’;

SELECT COUNT(0) FROM t_cable WHERE project_code=‘TOMSerbia’ and attributes_json->’ . E n d I D ′ = ′ 020100005 4 ′ a n d a t t r i b u t e s j s o n − > ′ .EndID'='0201000054' and attributes_json->' .EndID=0201000054andattributesjson>.ClusterID’>=‘0307000064’;

SELECT distinct CAST(JSON_UNQUOTE(attributes_json->’ . C l u s t e r I D ′ ) A S c h a r ) a s o i d F R O M ‘ t c a b l e ‘ ; S E L E C T c o u n t ( d i s t i n c t C A S T ( J S O N U N Q U O T E ( a t t r i b u t e s j s o n − > ′ .ClusterID') AS char) as oid FROM `t_cable`; SELECT count(distinct CAST(JSON_UNQUOTE(attributes_json->' .ClusterID)ASchar)asoidFROMtcable;SELECTcount(distinctCAST(JSONUNQUOTE(attributesjson>.ClusterID’) AS char)) as c FROM t_cable where attributes_json->’ . C l u s t e r I D ′ ; S E L E C T c o u n t ( d i s t i n c t J S O N U N Q U O T E ( a t t r i b u t e s j s o n − > ′ .ClusterID'; SELECT count(distinct JSON_UNQUOTE(attributes_json->' .ClusterID;SELECTcount(distinctJSONUNQUOTE(attributesjson>.ClusterID’)) as c FROM t_cable where attributes_json->’$.ClusterID’;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值