在 cosmos db 中有什么方法可以返回标量对象而不是数组吗?
SELECT * FROM c where c.VesselId=40
返回:
[
{
"VesselId": 40,
"LatestReportId": null,
"Name": "xxx",
}
]
我想要:
{
"VesselId": 40,
"LatestReportId": null,
"Name": "xxx",
}
尝试SELECT top 1 c FROM c where c.VesselId=40
或SELECT top 1 VALUE c FROM c where c.VesselId=40