http://www.linuxask.com/questions/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 }
Related posts:
- Drop a collection in MongoDB
- Drop all tables in MySQL database
- Repair and compact database in MongoDB
- How to get the total database index size of my MongoDB
- Select a document in MongoDB
时间: 2024-10-16 04:36:31