mysql json

SELECT distinct CAST(JSON_UNQUOTE(attributes_json->’.ClusterID′)ASchar)asoidFROM‘tcable‘whereattributesjson−>′.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->’.ClusterID′)ASchar)asoidFROM‘tcable‘;SELECTdistinctCAST(JSONUNQUOTE(attributesjson−>′.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->’.EndID′=′0201000054′andattributesjson−>′.EndID' = '0201000054' and attributes_json->'.EndID=0201000054andattributesjson>.ClusterID’ >= ‘0307000064’;
select * from t_cable where attributes_json->’.EndID′=′0201000054′andattributesjson−>′.EndID' = '0201000054' and attributes_json->'.EndID=0201000054andattributesjson>.ClusterID’ >= ‘0307000064’;

SELECT COUNT(0) FROM t_cable WHERE project_code=‘TOMSerbia’ and attributes_json->’.EndID′=′0201000054′andattributesjson−>′.EndID'='0201000054' and attributes_json->'.EndID=0201000054andattributesjson>.ClusterID’>=‘0307000064’;

SELECT distinct CAST(JSON_UNQUOTE(attributes_json->’.ClusterID′)ASchar)asoidFROM‘tcable‘;SELECTcount(distinctCAST(JSONUNQUOTE(attributesjson−>′.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->’.ClusterID′;SELECTcount(distinctJSONUNQUOTE(attributesjson−>′.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、付费专栏及课程。

余额充值