“db.dropDatabase()” method is used to drop
database.
> show dbs
admin (empty)
local 0.078GB
sample 0.078GB
test (empty)
>
>
>
>
> show dbs;
admin (empty)
local 0.078GB
sample 0.078GB
test (empty)
>
>
> use sample;
switched to db sample
>
>
> db.dropDatabase();
{ "dropped" : "sample", "ok" : 1 }
>
> show dbs;
admin (empty)
local 0.078GB
test (empty)
>
Prevoius Next Home
No comments:
Post a Comment