【发布时间】:2013-11-03 06:57:15
【问题描述】:
最近升级到使用 PostgreSQL 9.3.1 以利用 JSON 功能。在我的表中,我有一个 json 类型的列,其结构如下:
{
"id": "123",
"name": "foo",
"emails":[
{
"id": "123",
"address": "somethinghere"
},
{
"id": "456",
"address": "soemthing"
}
]
}
这只是用于问题目的的虚拟数据。
是否可以根据 id 查询 emails 数组中的特定项目?
差不多:“return email where id=123)”?
【问题讨论】:
标签: sql json postgresql postgresql-9.3 lateral