以文本形式获取对象值

最近更新时间: 2025-10-11 18:10:00

postgres=# select f_json ->>'col2' as col2 ,f_json ->> 'col3' as col3 from t_json;
 col2  | col3 
-------+------
 TDSQL PG | 
 TDSQL PG | pgxz
(2 rows)
postgres=# select f_json ->>'col2' as col2 ,f_json ->> 'col3' as col3 from t_json where f_json ->> 'col3' is not null;
 col2  | col3 
-------+------
 TDSQL PG | pgxz
(1 row)