jsonb_to_recordset ( supplement_information ) AS jtr(type text) where jtr.type = '3'
jsonb_to_recordset ( json格式列名 ) AS 别名(列里面字段名 字段类型) where 别名.列里面字段名 = 筛选条件
这里有个例子:
select * from jsonb_to_recordset('[{"type": "1", "id": "1"},{"type":"2", "id": "2"},{"type": "3", "id": "3"}]'
:: jsonb) as jsonbset(type text, id text) where jsonbset.type= '3'
postgreSql 查询json、jsonb格式json数组,筛选json数组中所有对象包含的字段的值
最新推荐文章于 2024-05-29 17:20:58 发布