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 中创建一个 any 函数来通过留在另一个 DB 中来创建一个新 DB。通过使用任何命令,如 USE、CONNECT)如果是这样,请提供链接或建议任何答案
我认为您不需要显式创建数据库。您可以立即使用它。
>use newdb // insert a new document into a collection >db.things.insert({attr:'someValue'}) >show collections system.indexes things >show dbs local (empty) newdb 0.203125GB