Uncaught exception: Reference error: Db is not defined
Uncaught exception: Reference error: Db is not defined
我是 MongoDb 的新手,我正在尝试使用命令行界面与数据库交互。但是,我面临错误未捕获的异常。谁能帮我解决这个问题?
> show dbs
Organization 0.000GB
admin 0.000GB
config 0.000GB
local 0.000GB
> Organizations.dropDatabase()
uncaught exception: ReferenceError: Organizations is not defined :
@(shell):1:1
>
感谢您的帮助
试试这个:
use Organizations
db.dropDatabase()
或
db.getSiblingDB("Organizations").dropDatabase()
看看 dropDatabase 是如何工作的。
> use Organizations
> db.dropDatabase()
我是 MongoDb 的新手,我正在尝试使用命令行界面与数据库交互。但是,我面临错误未捕获的异常。谁能帮我解决这个问题?
> show dbs
Organization 0.000GB
admin 0.000GB
config 0.000GB
local 0.000GB
> Organizations.dropDatabase()
uncaught exception: ReferenceError: Organizations is not defined :
@(shell):1:1
>
感谢您的帮助
试试这个:
use Organizations
db.dropDatabase()
或
db.getSiblingDB("Organizations").dropDatabase()
看看 dropDatabase 是如何工作的。
> use Organizations
> db.dropDatabase()