Drop a database in MongoDB

http://www.linuxask.com/questions/drop-a-database-in-mongodb

Drop a database in MongoDB

Answer:

Assuming you are going to drop the `test` database in MongoDB, follow the steps below to drop (delete) it.

>  use test
switched to db test

> db.dropDatabase()
{ "dropped" : "test.$cmd", "ok" : 1 }
posted @ 2015-01-15 22:11  seasonzone  阅读(644)  评论(0编辑  收藏  举报