Couchbase 4010 Error

前提是你 提交于 2020-02-14 05:45:27

问题


I've been testing Couchbase 5 and created a bucket called fp-conversion-data which has some JSON data in it. I have been trying to run some simple queries such as:

SELECT * FROM fp-conversion-data limit 5;

Instead of getting the expected results, I keep getting this error:

[
  {
    "code": 4010,
    "msg": "FROM expression term must have a name or alias",
    "query_from_user": "SELECT * FROM fp-conversion-data limit 5;"
  }
]

回答1:


I think the problem is that you have dashes in the name of the bucket. Use backticks (`) around the bucket name.

Try this:

SELECT *
FROM `fp-conversion-data`
LIMIT 5;


来源:https://stackoverflow.com/questions/48510648/couchbase-4010-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!