"'SELECT *' is only valid with a single input set."



尝试在沙箱中学习查询语法(https://www.documentdb.com/sql/demo)

SELECT food.id FROM food JOIN t in food.tags WHERE t.name = "oil"

这有效,但是如果我想获取整个文档,所以我尝试了

SELECT food.* FROM food JOIN t in food.tags  WHERE t.name = "oil"

SELECT * FROM food JOIN t in food.tags  WHERE t.name = "oil"

并获取错误:

{
  "errors": [
    {
      "severity": "Error",
      "location": {
        "start": 7,
        "end": 8
      },
      "code": "SC2040",
      "message": "'SELECT *' is only valid with a single input set."
    }
  ]
}

如何将整个文档退回?

您想要的是:

SELECT VALUE food FROM food JOIN t in food.tags WHERE t.name = "oil"

最新更新