数据库的存在的json字段
{"role": "COMPUTE", "vcpu": "1", "region": "ap-seoul-1", "userId": "12", "vendor": "oracle", "category": "COMPUTE_CLUSTER", "tenantId": "0", "clusterId": "7", "lifecycle": "ondemand", "scaleMode": "NONE", "fs-platform": "LINUX", "apiClusterId": "8", "cloudAccount": "FASTONE", "instanceType": "D3-c1-m4-g0", "partitionName": "partition0866", ".image_version": "7.5", "cloudImageName": "fs-centos-7.5", "deploy_node_id": "17", "fsInstanceType": "s2.c1.2"}
select * from event where resource_data->>'instanceType'='E4-c1-m4-g0'
resource_data 是数据库的字段名字
instanceType:是json中的key
‘E4-c1-m4-g0’:是json中的value
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://blog.csdn.net/sunyuhua_keyboard/article/details/121575553
内容来源于网络,如有侵权,请联系作者删除!