postgreSql-json 发表于 2022-03-20 分类于 编程 文章字数:59,阅读全文大约需要1分钟 基本使用123456-- 从data表中模糊查询data_content(json)中的code属性select * from data where data_content::json ->> 'code' like '%123%'-- ::json转成json-- ->>接收字符串-- -->>'code' 字符串类型的code字段 操作符123-> / ->> 取一层#> / #>> 可取多层: jsonContent::json #>>{a,b} //bbbb{"a":"{'b':'bbbb'}"}