6,129
社区成员
发帖
与我相关
我的任务
分享
postgres=# create table testjson(id serial, data json);
postgres=# insert into testjson (data) values('{"a": 1, "b": 2}'::json);
postgres=# insert into testjson (data) values('{"a": 3, "b": 4, "c": 5}'::json);
postgres=# insert into testjson (data) values('{"a": 6, "c": 7}'::json);
---
select * from testjson where (data->>'a')::int>1;