Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的 mongoDB 数据库中,我有名为数字的集合。例如
db.15.find()
如果您还不知道这将返回错误。如何获取文档 id 一个名为数字的集合?
您可以使用getCollection()方法。
对于你的例子,你得到:
db.getCollection('15').find();
HTH - 抢。